[TYPO3] repeat first level title in second level
JoH asenau
info at cybercraft.de
Wed Nov 14 00:51:11 CET 2007
> I go for the most easiest way (LOAD_REGISTER)!
> But performance is also very important actually. What do you suggest?
> Can you please give me an example how to do this?
Try this one:
obj.tabmenu = HMENU
obj.tabmenu {
special = list
special.value = 6,5,4,3,2,15,16
wrap = <ul id="nav">|</ul>
1 = TMENU
1 {
expAll = 1
noBlur = 1
NO = 1
NO {
before.cObject = LOAD_REGISTER
before.cObject {
parentTitle.cObject = TEXT
parentTitle.cObject.field = subtitle // title
}
stdWrap.htmlSpecialChars = 1
ATagTitle.field = subtitle // title
wrapItemAndSub = <li>|</li>
}
ACT < .NO
}
2 = TMENU
2 {
expAll = 1
wrap = <ul>|</ul>
noBlur = 1
NO {
stdWrap.dataWrap = {register:parentTitle}: |
stdWrap.htmlSpecialChars = 1
ATagTitle.field = subtitle // title
ATagTitle.dataWrap = {register:parentTitle}: |
wrapItemAndSub = <li>|</li>
}
ACT < .NO
ACT {
wrapItemAndSub = <li class="act">|</li>
}
IFSUB < .NO
IFSUB {
wrapItemAndSub = <li class="ifsub">|</li>
}
ACTIFSUB < .NO
ACTIFSUB {
wrapItemAndSub = <li class="actifsub">|</li>
}
}
}
I streamlined the setup a bit since the wraps and other stuff looked quite
similar to me.
the dataWrap section is just an example to get something like
Parent Title: Child Title
Feel free to modify it however you like.
HTH
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com
Jobs: http://www.professionals-only.com
More information about the TYPO3-english
mailing list