[development] Menu tasks

Karoly Negyesi karoly at negyesi.net
Mon Mar 12 11:05:01 UTC 2007


Hi,

After quite some delays, community voting down a major roadblock and  
Steven lending a hand yesterday, menu phase two nears completeness. By the  
time you read this letter, http://drupal.org/node/126128 is likely  
committed -- or if not, I think it'll be very soon.

Once that patch is in, I am moving to phase three, editing menu.

However, there are problems that needs to be addressed (only after that  
patch is in):

-- http://drupal.org/node/115847 this is a nice issue. Most default tabs  
indeed link to parent like the View tab needs to point to user/1 and not  
user/1/view . However, the Search default tab after you searched for  
something does not point to search/content but to  
search/content/whatever/you/searched/for. Either one can figure a way for  
the code to determine what to do based on the present database structure  
or we need to amend the database and likely manually mark search/content .

-- the by modules admin page is not coded for the new system. It's very  
likely to blatant easy the other pages were.

-- localization. Introduce title callback, default to t, make 'title' the  
first argument of title callback, and introduce title arguments, I guess  
it will not be used too widely. Remove t() from all menu title  
definitions. Reason, the titles will be stored in the database in the  
language of the user who happens to run menu_callback. You will want to  
run t() in _menu_translate. Make a special case for t(), no  
call_user_func_array, not even unserializing title argument is necessary  
in 99.9% of cases. Storing descriptions without t() is also heartily  
recommended but I think there is no need for a callback or an argument for  
that one. Once this is done, I think most (all?) loops can be removed from  
menu definitions and replaced by nice object paths (object path:  
node/%node).

-- inspect _menu_translate for caching possibilites -- is the same item  
translated twice? I do not think it happens too often, but maybe on task  
pages.

Any takers? As you can see, it's laid out what needs to be done, it's just  
a matter of plunging in and typing.

Regards,

NK


More information about the development mailing list