Drupal: .htaccess Access Deny
August 21, 2014 – 7:59 am | No Comment

In this article I will tell how to forbid access to certain resources for some clients. The instructions will include descriptions of different directives.

Read the full story »
CSS Templates

Contain reviews and news about CSS Templates.

Freebies

Contain freebies such as icons, graphics, headers and images for your websites.

Fun Stuff

Contains other fun stuff for entertainment or interesting site showcase.

How-To

Contain technical elaborations on some specific workarounds or common tweak.

Joomla Templates

Contains reviews and news about Joomla templates.

Home » Uncategorized

Drupal: Menu Constants And Functions

Submitted by on June 26, 2012 – 12:23 pmNo Comment
In this article you will find a list of main Drupal menu constants with descriptions and code examples.

Constants

 

Name Description Code example
MENU_CALLBACK
includes/menu.inc
Register a function by a given URL. They aren’t shown in menu
<?php
define('MENU_CALLBACK', MENU_VISIBLE_IN_BREADCRUMB);
?>
MENU_DEFAULT_LOCAL_TASK

includes/menu.inc

Every set of local tasks is a single task by default. This single task refers to the same path as its parent.
<?php
define('MENU_DEFAULT_LOCAL_TASK', MENU_IS_LOCAL_TASK | MENU_LINKS_TO_PARENT);
?>
MENU_LOCAL_TASK

includes/menu.inc

Local tasks are shown as tabs by default. Use this for menu items which describes actions made on a parent item. For example, ‘node/52/edit’ path which solves an editing task (‘edit’) for ‘node/52′.
<?php
define('MENU_LOCAL_TASK', MENU_IS_LOCAL_TASK);
?>
MENU_MAX_DEPTH

includes/menu.inc

The maximum depth of a menu links tree – matches the number of p columns.
<?php
define('MENU_MAX_DEPTH', 9);
?>
MENU_MAX_PARTS

includes/menu.inc

Maxumum number of menu callback path elements.
<?php
define('MENU_MAX_PARTS', 7);
?>
MENU_NORMAL_ITEM

includes/menu.inc

Usual menu items which are shown in a menu tree and can be moved-hidden by admin. Use for the most menu items. This is the default value if menu item type is not specified.
<?php
define('MENU_NORMAL_ITEM', MENU_VISIBLE_IN_TREE | MENU_VISIBLE_IN_BREADCRUMB);
?>
MENU_SUGGESTED_ITEM

includes/menu.inc

Modules can suggest menu elements. By default, such elements are disabled and act as callbacks until admin enable them. When enabled, they become regular menu items.
<?php
define('MENU_SUGGESTED_ITEM', MENU_VISIBLE_IN_BREADCRUMB | 0x0010);
?>

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.