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

With Tree Menu Magic 2 (TMM2) I have some normal page links that include page anchors and the Current Marker does not open the relevant page. Is there a way to have the TMM2 system ignore the anchor when current marking?

The Answer

Prepared Jul. 2013 by Gerry Jacobsen, PVII

The Tree Menu Magic 2 (TMM2) current marker will take the anchor portion of the page address into account when looking for a match in the menu. You can apply this quick code tweak to remove the anchor portion of the page address from this match:

1. Open the p7TMM scripts.js file and locate this code block in the P7_TMMcurrentMark(el) function, around line 520:

  wH=window.location.href;
  if(el.p7opt[12!=1]){

2. Make a new line in between the two line and then Copy & Paste this into the new line:

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

so that it now looks like this:

  wH=window.location.href;
  wH=wH.replace(window.location.hash,'');
  if(el.p7opt[12!=1]){ 

3. Save and close the file.

That's it, the TMM2 system will now ignore the anchor portion of the page address.

Back to the questions list