[TYPO3-templavoila] Multiple FCE (TOs) with same DS, but different TypoScript
ronslists at busynoggin.com
Fri Sep 5 03:32:36 CEST 2008
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
# Look up the rootline for the Template Object
key.data = levelfield : -1, tx_templavoila_to, slide
default < defaultHeader
# Microsite with Sidebar
5 < micrositeHeader
# Microsite Narrow
6 < micrositeHeader
# Subpage with menu
8 < subpageHeader
A similar approach should work for you.
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
> ...should work. Note that it won't work in page DS when you inherit
> template object.
> TYPO3-project-templavoila mailing list
> TYPO3-project-templavoila at lists.netfielders.de
More information about the TYPO3-project-templavoila