It seems that using menus, when you have an item with subitems under it, the menu fails to expand on click when the associated link (for the parent item) contains ? arguments. An example of what I mean:
I have a link in a menu that goes to flexinode/termstable/4/1, and that works fine (it expands on click to show what's under it.)
When I change it to link to flexinode/termstable/4/1?sort=asc&order=Date or even just flexinode/termstable/4/1?sort=asc, it goes there correctly on click but does not expand!
If these URLs look weird, it's because I'm using flexinode_terms_extension, which was posted here: http://drupal.org/node/11212 .
Comments
Comment #1
JonBob CreditAttribution: JonBob commentedThe $_GET['q'] variable is used to test for the user's current location. This does not reflect additional query string parameters such as the sort=asc in your example. I agree that it would be nice to allow for query string parameters in custom menu items, but I don't see an immediate way to do this.
Comment #2
JonBob CreditAttribution: JonBob commentedComment #3
(not verified) CreditAttribution: commentedsubstr($_SERVER['PATH_INFO'],1)
Won't this do the trick?
Comment #4
Robin Monks CreditAttribution: Robin Monks commentedStill here on latest HEAD.
Comment from chx:
I'd investigate request_uri() instead of $_GET['q'] ...
Robin
Comment #5
dopry CreditAttribution: dopry commentedThis still applies... I tested again cvs HEAD.
Comment #6
mariuss CreditAttribution: mariuss commentedStill seeing this issue in Drupal 4.7.2, and this is pretty bad if you cannot use clean url.
I have to disable clean URLs for a site and since now all URLs have a query string (i.e. /?q=...) submenus are totally broken. The active class is set for the selected menu item, but it is not expanded.
Comment #7
Steven CreditAttribution: Steven commentedMenu item paths are not the same as URLs. Query string parameters are not supported.
Comment #8
kevinquillen CreditAttribution: kevinquillen commentedWhy not? What if I am linking to a prefiltered search page? I don't want to create a bunch of nodes and logic for no reason.