[TYPO3-english] typoscript creating another li above the active li?
Clay Sissing
clay at kdweb.co.uk
Tue Dec 2 15:18:42 CET 2008
Hello All
Need to put a class on the active link. The script below is doing that
as well as creating a li above the active link.
Placed the script below.
Anybody can help with this?
page.10.subparts.MAIN_NAV = COA
page.10.subparts.MAIN_NAV {
10 = HMENU
10 {
special = directory
special.value = 1
1 = TMENU
1 {
wrap = <ul
id="navfirst">|</ul>
NO {
allStdWrap {
wrap = <li>| </li>
if {
value.data =
register:count_HMENU_MENUOBJ
negate = 1
isLessThan {
prioriCalc = 1
cObject = TEXT
cObject.insertData = 1
cObject.value =
({register:count_menuItems} + 1) / 2
}
}
}
stdWrap.if < .allStdWrap.if
}
ACT < .NO
ACT = 1
ACT.linkWrap = <li
class="active"> |</li>
}
}
20 < .10
20.1.wrap = <ul>|</ul>
20.1.NO.stdWrap.if.negate >
20.1.NO.allStdWrap.if.negate >
20.1.ACT.linkWrap.if.negate >
20.1.ACT.allStdWrap.if.negate >
}
Thanks
Clay
More information about the TYPO3-english
mailing list