[TYPO3-UG US] TypoScript conditions refresher
Finees Mendez
fineesmendez at yahoo.com
Mon Mar 24 20:38:09 CET 2008
Hi all,
I am working on a graphics header for the subpages of the website. I am attempting to display a different image for each subpage in the first sub level only. Here is the code below, but my question is in regard to best TS coding practices. How can I write an IFELSE statement with TS. Below is a functional code, but not the best efficient. I know that operators like [else] [end] and [global] work, but what about an ifelse, a multi conditional statement. Your thoughts? Thank you.
Code:
[PIDinRootline = 38 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header01.jpg
[else]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header.jpg
[end]
[PIDinRootline = 32 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header02.jpg
[else]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header.jpg
[end]
[PIDinRootline = 31 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header03.jpg
[else]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header.jpg
[end]
[PIDinRootline = 24 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header04.jpg
[else]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header.jpg
[end]
[PIDinRootline = 18 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header05.jpg
[else]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header.jpg
[end]
[PIDinRootline = 16 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header06.jpg
[else]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header.jpg
[end]
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
More information about the TYPO3-UG-US
mailing list