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 #203

Some of my page links are using page anchors in the URL, is there a way to have the PopMenu Magic (PMM) system ignore the anchor for the current marker and BreadCrumb?

The Answer

Prepared Dec. 2006 by Gerry Jacobsen, PVII

The automated Current Marking and Bread Crumb Trail builder in the PopMenu Magic system will attempt to match one of the links in the menu with the complete address of the current page. If you are using page anchors then this will interfere with the Current Marking system. You can deploy a small tweak that will allow the current marking system to ignore the hash (#) and anything that follows it.

Here' how:

1. Open the PopMenu Magic JavaScript file (p7popmenu.js) in Dreamweaver.

2. Locate this line of code in the P7_PMopen() function, it should be at line 68:

tA=document.getElementById('p7PMnav').getElementsByTagName("A");wH=window.location.href;r1=/index\.[\S]*/i;for(i=0;i<tA.length;i++){

3. Place your cursor after the semicolon that follows "href" and press your Enter key twice to create a new line at that point.

4. Copy and paste this code into the new line:

wH=wH.replace(window.location.hash,'');

5. The lines would now look like this:

tA=document.getElementById('p7PMnav').getElementsByTagName("A");wH=window.location.href;
wH=wH.replace(window.location.hash,'');
r1=/index\.[\S]*/i;for(i=0;i<tA.length;i++){

6. Save the file.

That's it. The Current Marking system in PopMenu Magic will now ignore any anchors in the page URL.

Back to the questions list