[Typo3] third level menu does not stay?
Bing Du
du_bing at hotmail.com
Thu Jun 9 16:58:44 CEST 2005
The site shows the following menu on the left.
level 1
level 2
Here is the problem I'm experiencing. Clicking 'level 2' shows:
level 1
level2
level 3
However, although clicking 'level 3' displays its page content fine, the
menu changes back to:
level 1
level 2
Why 'level 3' doesn't stay?
Menu is constructed in typoscript as:
===========
temp.nav = HMENU
temp.nav.1 = TMENU
temp.nav.1 {
expAll = 1
wrap = <table width="150" border=0 cellspacing=0
cellpadding=0><tr><td><img src="clear.gif" width=1 hspace=200 height=1
vspace=3 border=0></td></tr> | </table>
NO {
linkWrap = {$menu.L0.fontWrap}
doNotLinkIt = 1
allWrap = <tr><td><img src="clear.gif" width=1 height=1
vspace=3 border=1><br> | </td></tr>
}
ACT = 1
ACT < .NO
}
temp.nav.2 = TMENU
temp.nav.2 {
expAll = 1
wrap = <tr><td nowrap><ul> | </ul></td></tr>
NO {
RO = 1
after = <br>
ATagBeforeWrap = 1
linkWrap= {$menu.L1.fontWrap}
beforeWrap = <li>
stdWrap.field = title
ATagParams = onclick="return toggleSubmenu(this);"
allWrap = |
after.field = uid
afterWrap = <ul style="display:none;" id="page|">
wrapItemAndSub = |<li></li></ul></li>
}
ACT = 1
ACT < .NO
}
temp.nav.3 = TMENU
temp.nav.3 {
expAll = 1
NO {
RO = 1
after = <br>
ATagBeforeWrap = 1
linkWrap= {$menu.L1.fontWrap}
beforeWrap = <li>
stdWrap.field = title
ATagParams = onclick="return toggleSubmenu(this);"
allWrap = |
after.field = uid
afterWrap = <ul style="display:none;" id="page|">
wrapItemAndSub = |<li></li></ul></li>
}
ACT = 1
ACT < .NO
}
=========================
And here is the toggleSubmenu(this) function:
=====
function toggleSubmenu(link)
{
var temp = (link.href).split("=");
var div = document.getElementById("page" + temp[1]);
div.style.display = (div.style.display == 'block') ? "none" : "block";
if (div.innerHTML != '<li></li>') {
if (link.className == "")
link.className = "tempselected";
else
link.className = "";
return false;
} else {
return true;
}
}
=====
I'd appreciate any help.
Bing
More information about the TYPO3-english
mailing list