[TYPO3] if + numrows trouble
JoH asenau
info at cybercraft.de
Mon Nov 26 15:17:16 CET 2007
> I have dynamically generated table of contents. Now I want it to
> be skipped if there's only one item on the page. I wrote the following
> code in the template setup, but it doesn't work and doesn't produce
> any kind of error messages. What am I doing wrong here?
>
> ...
> temp.contentnav = CONTENT
> temp.contentnav {
> ...
> if {
> }
> ...
> }
Well - there is no CONTENT.if available and this is why it will just be
ignored.
TypoScript is no real language so you won't get any error message because
you are allowed to put as many parameters into any element as you like. If
they are available they will work, if not they will be ignored.
Advantage: The rest of the code will still work
Disadvantage: It's sometimes hard to find the bug
But fortunately you got CONTENT.stdWrap so this one will work:
stdWrap.if {
#same settings here
}
BTW: pidInList has got a default value "this" so you don't have to set it
each time you are using a select.
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