Scroll To Top

Enter a query to search our site. Note that you can use "*" and "?" as wildcards. Enclosing more than one word in double quotes ("CSS Layout") will search for the exact phrase.

PVII Knowledge Base

1. Select a product ...
2. Select category ...
3. Search the Knowledge Base...

Question #200

All of my pages are dynamic and using url parameters, is there a way to have the TabBar Magic (TBM) auto opener (current marker) highlight the page name by ignoring the url parameters?

The Answer

Prepared Nov. 2006 by Gerry Jacobsen, PVII

By default the automated current marker in the TabBar Magic menu system will highlight a menu link only if there is an exact match between the complete URL in the browser address bar and one of the actual links in the menu. If you are creating many of your pages dynamically then most likely there will never be an exact match.

You can apply this small tweak to the TBM scripts so that the URL parameter will be ignored by the current marker so it will match only on the page file name.

Here's how:

1. Open the TBM scripts file, p7tbmenu.js and locate this line in the P7_TBMopen() function, it should be line 108:

var x,i,j,k,kk,wH,tM,tA,pp,cl,a,nd,op,r1,aU;wH=window.location.href;

2. Place your cursor at the end of the line and hit the Enter key to create a new line directly after this line.

3. Copy and paste this code line into the new line you just created:


so the first few lines of the revised function will now look like this:

function P7_TBMopen(){ //v1.0.8 by
 var x,i,j,k,kk,wH,tM,tA,pp,cl,a,nd,op,r1,aU;wH=window.location.href;
 var mt = new Array(1,'','');if(document.p7TBMop....

4. Save the file.

That's it. Now the automated current marker in TabBar Magic will look only at the actual file name in the URL for a matching link, the URL parameters will be ignored.

Back to the questions list