Developer forum

Forum » Templates » dropdown menu with inactive pages. Menu not showing indicator

dropdown menu with inactive pages. Menu not showing indicator


Reply

HI I have a dropdown menu and it is working fine. BUT under some off the items I have pages that is not ready yet and is therfore not shown in the menu but eabled right now. When the dropdown is shown the pages are not shown BUT there is an indication that there is pages in this menu. Is there a way that I can have the pages that are not active under the menu and without having the indicator for pages under this menu item??


 


THANKS


Replies

 
Nicolai Høeg Pedersen
Reply
lgr@proinfo.dk wrote:


HI I have a dropdown menu and it is working fine. BUT under some off the items I have pages that is not ready yet and is therfore not shown in the menu but eabled right now. When the dropdown is shown the pages are not shown BUT there is an indication that there is pages in this menu. Is there a way that I can have the pages that are not active under the menu and without having the indicator for pages under this menu item??




 




THANKS





Hi Lars


 


Christian Steinmeier, former employee at a partner - now working at Dynamicweb with VIA, made this simple but effective JS:


 


// This takes care of hiding the arrows in the dropdownmenus for non-existing submenus.


function csFixDWDropdownMenus() {


var aTables = document.getElementsByTagName("table");


var oTable, t=0;


while (oTable = aTables[t++]) {


if (oTable.rows.length == 0) {


csKillDropdownArrow(oTable.parentNode.id);


}


}


}


function csKillDropdownArrow(sID) {


var oTR = document.getElementById(sID.replace("submenu", ""));


if (oTR) {


oTR.cells[2].getElementsByTagName("img")[0].style.visibility = "hidden";


}


}


 


Call the csFixDWDropdownMenus in the bodys onload.

 
Reply

Hi Nicolai,


 


How about placing this as standard in Dynamicweb? Sure seems qualified enough for it :P


 


Nuno

 

You must be logged in to post in the forum