By pturner on
Environment
mysql Ver 14.14 Distrib 5.1.22-rc, for redhat-linux-gnu (x86_64) using readline 5.0
Drupal 5.6 - pretty much just core, added modules IMCE, Tinymce
I'm creating menus and I put the link for a menu item as:
forecast/products?fcast=coos1
When I rollover the menu item in Firefox I get the link (along with the added http://myhost.org/) as displayed above in the FF status bar but when I click on the link, Drupal converts the ? and = and a page not found error is displayed. The link winds up being:
http://myhost.org/forecast/products%3Ffcast%3Dcoos1
I must be missing something important about menu items here as I think there should be no conversion.
Thx,
--pturner
Comments
Yes annoying one this
Ahh - yes at the moment you can't have query strings or fragments in the URLs used in your menu items - which is a bit of a pain. I think there are a couple of patches kicking around (this one is for 6 though http://drupal.org/node/90570) so it might be worth having a bit of a google around.
The other option would be to pop something in the theme layer and override theme_menu_item_link and get it to parse the URL and extract any querystring or fragment args before passing into the l function ...
Mike,
Computerminds offer Drupal development, consulting and training
Mike,
Computerminds offer Drupal development, consulting and training
Pop this into your template.php
I've just had a bit of a play and come up with the theme override -
if you pop that into your template.php file then you should hopefully find your links are working :)
Cheers,
Mike,
Computerminds offer Drupal development, consulting and training
Mike,
Computerminds offer Drupal development, consulting and training
Thanks for your assistance
Mike,
Thanks for your assistance and the pointers and the code, check's in the mail. The code didn't work for me right off but I'll investigate more. What is working is putting the complete url in the menu item - not the best solution but enough to get me going.
Thx,
--Paul
ThanQ
i want same thing like this. Thanks for your answer
Kamal Challa
OH YES!
This did work, thank you sir!