[TYPO3-english] getText and rootLine
JoH asenau
info at cybercraft.de
Fri Jul 29 21:12:57 CEST 2011
Am 27.07.2011 21:05, schrieb Rik Willems:
> Hi all,
>
> I'd like to do an if through stdWrap. Kinda similar to
> [PIDinRootline=x,y,z] but than through getText.
> I thought of if.value.data = TSFE:rootLine
>
> The php code in tslib_content makes it look like this should work. Or
> alternatively TSFE:tmpl|rootLine
10 = TEXT
10.value = blah
10.if.value.data = TSFE:rootLine
10.if.isInList = 123
Checks if 123 is a uid of a page in the list found at TSFE:rootLine.
But since rootLIne is not a list but an Array you should try using a
rootline menu together with if:
10 = TEXT
10.value = blah
10.if {
value = 0
value.append = HMENU
value.append {
special = rootline
special.range = 0|-1
1 = TMENU
1 {
NO {
doNotLinkIt = 1
stdWrap.field = uid
allWrap = ,|
}
}
}
isInList = 123
}
If you need it more than once you should create the HMENU inside a
LOAD_REGISTER and then use the register as the data of your if.value.
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
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
More information about the TYPO3-english
mailing list