[development] hook_help() vs $section for Drupal 6

Peter Wolanin pwolanin at gmail.com
Fri Jun 15 16:19:34 UTC 2007


Gabor, node module is already returning help based on the values of arg():

http://drupal.org/node/125279

-Peter

On 6/15/07, Gabor Hojtsy <gabor at hojtsy.hu> wrote:
> It would be nice if some people would show interest in discussing this,
> it is really a tiny question. Or should I pick and implement a solution
> myself? Passing $_GET['q'] would be simplest obviously, but I am not
> sure you would be fine with it. I only know for sure, if you tell us
> your view.
>
> Gabor
>
> Gabor Hojtsy wrote:
> > Hi,
> >
> > In an unrelated issue, we found that hook_help($section) gets called
> > with the menu key now. So
> >
> >  - if you have a "node/%node/edit", you get this in the help hook
> >  - if you have a "node", (which gets called with node/$nid too
> >    obviously), you don't get the $nid in the help hook
> >
> > The argument for this is that it is easy to provide broad help texts.
> > The arguments against is obviously that it is very hard to provide
> > focused help texts (like it is impossible to provide help text for a
> > block configuration page based on $section alone).
> >
> > A couple of ideas popped up from Peter Wolanin and myself, so we only
> > need to pick up the right one :)
> >
> >  1. Pass on $_GET['q'] simply to hook_help(). This makes it harder
> >     to provide a broad help text, as you would need to preg the
> >     dynamic parts out yourself.
> >
> >  2. Pass on both $_GET['q'] and the menu key to hook_help(). This
> >     would allow for both, if you wish. $section would become
> >     $path and $menu_key or something along the lines.
> >
> >  3. Pass on the whole menu item structure which has even more
> >     details. For people who would like to customize their help
> >     even more (although I am not sure what else can be used from
> >     the menu there).
> >
> > Now what is left is to pick one of these up, or suggest something
> > better, so I can prepare a patch, and we can get this fixed soon.
> >
> > Gabor
> >
>
>


More information about the development mailing list