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

With Elevator Panel (EPM) or the Megavator Menus s there a way to have the panel that corresponds to the current page be always open and visible (persistent)?

The Answer

Prepared Dec. 2009 by Gerry Jacobsen, PVII

You can apply a simple code tweak for the Elevator Panel (EPM) system, or the Megavator Menus system, that will set the panel that corresponds with the "Current Marked" link to open automatically when the page first loads, and stay open (persistent) when the menu is not being used. When there is user action on the menu the panel will hide and allow normal menu mouse over action. When the user mouses away form the menu the "persistent" panel will be made visible again and stay visible while the menu is at rest.

Note: This tweak functionality requires that the Mouse Over and Out actions and the Current Marker options are enabled in the EPM user interface.

To apply the tweak:

1. Open the p7EPMscripts.js file, scroll to the end of the file and a new line and then paste this new function into that new line:

function P7_EPMpersist(dv){
   var i,tB;
   tB=document.getElementById(dv);
   for(i=0;i<tB.p7EPMtrig.length;i++){
      if(tB.p7EPMtrig[i].epmPersist){
         P7_EPMtrig(tB.p7EPMtrig[i],1);
      }
  }
}

2. Locate this block of code in the P7_PMMshut(d) function, around line 271:

 if(m){
     P7_EPMall(idd,'close');
 }

4. Make a new line right after the second line and paste this code into the new line:

     P7_EPMpersist(this.id);

so that it now looks like this:

 if(m){
     P7_EPMall(idd,'close');
     P7_EPMpersist(this.id);
 }

5. Now, to modify the current marker to set the panel to persistent, locate this code block in the P7_EPMcurrentMark(el) function, around line 616:

 if(tr){
     P7_EPMsetClass(tr,'current_mark');

6. Make a new line right after the first line and paste this code into the new line:

     tr.epmPersist=true;

so that it now looks like this:

 if(tr){
     tr.epmPersist=true;
     P7_EPMsetClass(tr,'current_mark');

7. Save and close the file.

That's it! The panel correlating to the current marked link will now show automatically and stay open (persistent) when the menu is at rest.

Back to the questions list