[development] menu status

Peter Wolanin pwolanin at gmail.com
Tue Jun 5 13:21:21 UTC 2007


$_GET['q'] is not the answer, since you may have additional elements
in the path that are not part of the router path.  I'd suggest instead
that we borrow from the way the menu link is constructed, and put the
un-mapped router path into $item['router_path']- or even into
$item['help_path'].

-Peter

On 6/5/07, Gabor Hojtsy <gabor at hojtsy.hu> wrote:
> Karoly Negyesi wrote:
> > Hi,
> >
> > The whole of menu subsystem is supposed to be fully functional now.
> >
> > Known issues:
> >
> > * update. Please test http://drupal.org/node/147657
> > * default tabs. Please help with adding comments to
> > http://drupal.org/node/115847
> >
> > Otherwise, please file issues -- patches preferred :) -- if something is
> > not working as it should.
>
> There is a very small issue which involves help texts. The path used to
> invoke the _help() hooks is:
>
> $path = ($item['type'] == MENU_DEFAULT_LOCAL_TASK) ?
>           $item['tab_parent'] :
>           $item['path'];
>
> So if we see the default local task, we get the parent tab, otherwise we
> get the menu path (which is what was registered in the menu hook). So it
> is not possible to have help for paths where a dynamic component is
> included, you get node/%node/edit in your help hook when on a node edit
> page. (Sure you can play with $_GET['q'] yourself in the hook, but it is
> certainly not clean)
>
> A small fix to use $_GET['q'] instead of $item['path'] is included in
> this (otherwise unrelated) patch, where we discovered this issue:
> http://drupal.org/node/141996#comment-254034
>
> It surely can be spin off to a separate patch, if it warrants further
> discussion.
>
> Gabor
>


More information about the development mailing list