[unsolved] putting a query string in a menu local task tab link item
any experience working with hook_menu, specifically for tabs
how would one pass a query from one of those links?
for instance, working with organic groups, on the group nodes, want tabs for adding new content inside the group
so the link needs to be something like
876 being whatever the current group context is
A Drupal 5 solution:
there is no [path] key in menu items now
the path is the item key:
$items['node/%node/members/invite'] = array( ...
but the idea is you just add "query" to the menu item array
and it gets passed to the theme system, even though it's not official?
and you make it so the theme knows what to do with it...
that will work for a menu_local_task type?
menu items should work the same regardless of the type
apparently hardcoding an external URL should let you use a query string
but this looks like a menu system fail
this is an internal link, but could give the full path anyway
callback to node_add
ugly as hell, but it looks like the other alternative is on the theme layer
Other alternative would be to make your own wrapper for organic groups stuff - define your own menu callback - that would take all necessary arguments in /ogid/uid/ or whatever order, and either call the OG function directly or do something horrible like a drupal_goto to the node path you actually want
Trying to figure out d6 equivalent to the theme layer hack
in drupal 6
only gets a $link argument
doesn't get $item anymore
link should be everything that the l() function expects though? maybe it just works in D6 if the info is passed in right?
well, don't see much usefull there... worst case scenario i can always use some kind of string/regex magic, though that's the definition of ugly
Old, old issue:
Custom menu items with query string parameters fail to expand
Not so old issue:
Menu system escapes query string