[TYPO3-UG US] TypoScript conditions refresher

Finees Mendez fineesmendez at yahoo.com
Tue Mar 25 20:16:52 CET 2008


Yes. But then I have to dig in to each page to make updates. I figured out what i was doing wrong, and here is the updated code. First set the global param, and then just change if condition is met. Thank you.

# First set my global condition 
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header.jpg

[PIDinRootline = 38 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header01.jpg
[end]

[PIDinRootline = 32 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header02.jpg
[end]

[PIDinRootline = 31 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header03.jpg
[end]

[PIDinRootline = 24 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header04.jpg
[end]

[PIDinRootline = 18 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header05.jpg
[end]

[PIDinRootline = 16 ]
page.1.subparts.PAGEHEADER.file.10.file = fileadmin/templates/zwire/images/gfx/page-header06.jpg
[end]

----- Original Message ----
From: Michael Cannon <michael at cannonbose.com>
To: Finees Mendez <fineesmendez at yahoo.com>; TYPO3 Usergroup America <typo3-ug-us at lists.netfielders.de>
Sent: Monday, March 24, 2008 6:31:12 PM
Subject: Re: [TYPO3-UG US] TypoScript conditions refresher

Finees,

Why not just stick the page.1.subparts... code into a TypoScript
template on those pages instead of worrying about the condition code?

This way you really do know where those images are at on the site and
are clear about them also changing their subpages as well.

On Mon, Mar 24, 2008 at 3:38 PM, Finees Mendez <fineesmendez at yahoo.com> wrote:
> 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
>  _______________________________________________
>  TYPO3-UG-US mailing list
>  TYPO3-UG-US at lists.netfielders.de
>  http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-ug-us
>



-- 
Michael Cannon
President of Cannonbose, LLC
+1 (800) 559-9773 | +1 (603) 559-9773 | Fax : +1 (802) 609-2776






      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping


More information about the TYPO3-UG-US mailing list