The drop is always movingYou know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgetsAll content management systems suck, Drupal just happens to suck less.Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]Drupal makes sandwiches happen.There is a module for that

Further menu phases

Submitted by nk on Mon, 2007-01-15 08:02

Now that menu phase 1 is basically done at http://drupal.org/node/34755 how we proceed?

Phase 2 will see some new fields, mid (for menu id), pid (for parent id), parents (comma separated list ids of all parents), menu_link, task, visible and finally, display_order. menu_link is the aliased and themed menu link. task and visible are flags which tells us what their name suggest. display_order will provide, well the display order, based on vancoding. All this means that one relatively simple query SELECT menu_link FROM menu WHERE pid IN $parents AND visible = 1 AND task = 0 ORDER BY display_order will be able to select the whole visible tree. $parents will be initialized to the parents of the current menu item and in phase 2 that's it. But in phase 3, as we create the menu tree we will check for expanded items and add them to parents and redo the menu tree. This means some slowdown especially if expanded is used in depth, but I can not care less -- for some time, I thought I will not even do expanded.

Another similar query will be able to select tasks. Here the display will be slower because % signs need replacement and because of that we can't store the menu_link ahead of time. This is less of a problem because usually we have much fewer tasks than menu items.

For phase 3, first we need to realize that the menu module does two things which UI look alike but for our system they are vastly different. One of them is editing menu items already defined. The other is adding (and editing) additional items. At this point I think they will use two tables and even two hooks to add this to the menu sytem. The first will use hook_menu_alter to change title, visible parent, description and weight based on its table. The second will likely use a new hook to add new items to the menu table. If we do not want to find ourselves in the same corner as we are now then this facility will not use unique paths, so it will become possible to add two visible links to the same path. Also, this new, yet unnamed hook will make it possible to add items to a non-navigation menu: you define your item as a MENU_CALLBACK in hook_menu and here you add a visible link to whatever menu you desire.

Commenting on this Story is closed.

Submitted by airarmy on Tue, 2009-10-06 12:06.

it possible to add items to a non-navigation menuIn 1950 Tiffany's had its biggest boost in popularity as Truman Capote's Breakfast at Tiffany's was published. Tiffany's was shot to worldwide fame in 1961 when the film adaptation staring Audrey Hepburn was released. This film and its star became icons
Tiffany
Tiffany jewellery
Of course tiffany, the ladies' favorite. Want to see her smile? It is absolutely right to buy
Tiffany co for her. Exquisite tiffany jewelries in high quliat
, bracelet jewelry, tiffany jewelry, necklace jewelry, ring jewelry, finger ring jewelry, earring jewelry.
Tiffany Jewellery offering bangle jewelry, bracelet jewelry, eardrop jewelry, necklace jewelry, ring jewelry, finger ring jewelry and earring jewelry
Tiffany Necklaces
Tiffany Bracelets
Tiffany Rings
links of london