Hi, I tried looking for a solution to the problem regarding query strings in the url and keeping the menu item highlighted, but have not found a working solution yet.
Does anyone have a way to strip the remainder of a querystring, prior to milonic reading the whole url in order to make the url match the menuitem?
I'm currently building the menu data from a sql database and adding the appropriate PageID=## in order to use that Page Id for other things. So, the first Query string actually matches what gets loaded into the milonic data for the menu.
example:
this does highlight in the menu
http://localhost/cedar/dev/classes.php?PageID=32
this does NOT highlight in the menu
http://localhost/cedar/dev/classes.php? ... signup=YES
Is there a solution for query string in the url for higlight
Re: Is there a solution for query string in the url for higlight
I don't know if this is the "BEST" method, but I found that if I split _Lhr prior to drawing the menu, I can remove the trailing variables from the querystring.
var myString = _Lhr;
var mySplitResult = myString.split(\"&\");
_Lhr = mySplitResult[0];
For other folks, it might be useful to split at the "?" in order to remove the entire query string.
var myString = _Lhr;
var mySplitResult = myString.split(\"&\");
_Lhr = mySplitResult[0];
For other folks, it might be useful to split at the "?" in order to remove the entire query string.