[TYPO3-templavoila] Multiple FCE (TOs) with same DS, but different TypoScript
Ron Hall
ronslists at busynoggin.com
Fri Sep 5 03:32:36 CEST 2008
Hi Simon,
Here is code a friend used in a site we worked on which conditionally
includes code based on the template object. It uses "slide" to look up
the page tree for the template object. In this instance we wanted to
include different TS libraries based on the template. Each of the case
numbers are the uid of the TO.
# CASE for including the correct CSS and JS based on Template Object
# This just includes everthing defined above into headerdata.
page.headerData.10 = CASE
page.headerData.10 {
# Look up the rootline for the Template Object
key.data = levelfield : -1, tx_templavoila_to, slide
# Default
default < defaultHeader
# Microsite with Sidebar
5 < micrositeHeader
# Microsite Narrow
6 < micrositeHeader
# Subpage with menu
8 < subpageHeader
}
A similar approach should work for you.
Ron Hall
On Sep 3, 2008, at 5:07 PM, Simon Tuck wrote:
> Ernesto Baschny [cron IT] wrote:
>
>> Or is this possible somehow? I would only need a way to access the
>> "current TO-name" from within the TypoScript in the DS.
>
> Something like this...
>
> [globalVar = TSFE:page|tx_templavoila_to = 2]
> lib.something.somevalue = my_other_value
> [global]
>
> ...should work. Note that it won't work in page DS when you inherit
> the
> template object.
> Cheers,
> Simon
>
> _______________________________________________
> TYPO3-project-templavoila mailing list
> TYPO3-project-templavoila at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-templavoila
More information about the TYPO3-project-templavoila
mailing list