[TYPO3] TMenu depth
Christopher Torgalson
bedlamhotel at gmail.com
Tue Sep 4 18:13:56 CEST 2007
Hi,
On 9/4/07, Brian <typo3-english at lists.netfielders.de> wrote:
> Suppose I have a menu structure that goes 10 levels deep (I don't really but just suppose). Is there a way to do something like:
>
> myMenu = HMENU
>
> # First level menu-object, textual
> myMenu.x = TMENU
> myMenu.x {
> #tt_content.stdWrap.dataWrap >
>
> # Normal state properties
> NO.subst_elementUid = 1
> NO.allWrap = <li class="levelx"> | </li>
> NO.ATagTitle =
> }
>
> So that if I wanted to add an 11th level I wouldn't need to modify the template? I suppose the question I need answered is there a way to access the level and set some property for all the levels?
Personally, I'd use CSS for this. See example TS and CSS below:
### TS ###
lib.menu = HMENU
lib.menu {
1 = TMENU
1 {
noBlur = 1
wrap = <ul id="navigation">|</ul>
NO {
wrapItemAndSub = <li>|</li>
}
ACT = 1
ACT < .NO
ACT.ATagParams = class="current"
}
2 < .1
2.wrap = <ul>|</ul>
3 < .2
4 < .2
}
/* CSS */
#navigation li { background:#f30; }
#navigation ul li { background:#f60; }
#navigation ul ul li { background:#f90; }
#navigation ul ul ul li { background:#fc0; }
--
Christopher Torgalson
http://www.typo3apprentice.com/
More information about the TYPO3-english
mailing list