Understand what I can do with a menu module


path to the menu
a page callback function
arguments to the function
menu item type
access rights needed

multiple menu items can be declared in a single menu hook

when you declare a menu item through a hook you dont indicate who your parent menu item is. this is implied by looking at the menu path.

drupal menu hook menu_name

Search for: drupal menu hook menu_name

what is the menu_name points to then?

understand drupal menus

Search for: understand drupal menus

Or am i just confused with the initial flurry!!

when I use the admin, i create any arbitrary menu with just a name. then i can add menu links underneath. these links can point to any path. these links can be children of each other.

So the parent child relationship is not really done by the path, it appears. or is it?

How can I link these two worlds? the programmatic menus and the admin menus? when I add a programmatic menu where does it end up? Under which admin menu will it show?

will it show in the navigation menu first? and then one can move it to the other menus??

when you define menus through the admin screens each menu is a hierarchical set of links.

Such a named menu can then be placed in a block. However the menu needs to be themed to display it either as vertical or horizontal etc.

It is especially not clear how to create a menu that flows through using dhtml.

How can I create sub menus in drupal

Search for: How can I create sub menus in drupal

this needs to be verified.

The additional path segments is each passed as a variable set of arguments but the function has to declare them

If you specify page callback arguments then they will be passed first to the menu function followed by the path variables.

The menu function is ultimately responsible for returning the html that will be used to paint the content portion of a page.

This flows from the fact that links with arbitrary paths can be made children of each other irrespective of their path hierarchy

In the drupal adminsitration page how does one create menu categories and menu items with in those. this seem to be an added on concept on top of menus.

An interesting claim: drupal in 7 hours

investigate further

This is a pretty good discussion on menu_name

you should have to have the menu created

you should prefix your menu title with menu- to refer to it via menu name.

Leads me to wonder if there is a better way to realize the machine name of the menu. One suggestion was to see the html source code that was generated.

The discussion also hints at overloading the install to create the MENU programmatically.

Say I create a set of menus programmatically. Say the paths are hierarchical. By default these will show up in the navigation menu one under the other. This relationship is established by the paths. what happens when I go to the admin and rearrange their hierarchy? which hierarchy takes precedence?

I suppose I can test this


/seg1/%/seg2/seg3
...
...
page callback argument => array(1)
...
function pagecallback($arg1){}

The $arg1 will contain the indicated path segment.


/seg1/%somefunc_name/seg2/seg3
...
...
page callback argument => array(1)
...
function somefunc_name_load($var1)
...
function pagecallback($arg1){}

The path segment is passed to a function and then the result is passed as arg1

that given a menu or a menu path one should be able to create a page as one wishes. This appears to be the case where admin menu categories are constructed.

dhtml menus and drupal

Search for: dhtml menus and drupal

dhtml menus project at drupal

This seems pretty nice the jquery menu

By extension can I get the menu worth of data (essential the hierarchical links) as a render array or such structure that I can use my own template to render?