[TYPO3-english] Home page +EXT template not applying
bernd wilke
t3ng at bernd-wilke.net
Fri Jan 31 08:45:56 CET 2014
Am 30.01.14 18:35, schrieb Gerry Rigney:
> Hi All
>
> New to Typo3 so apologies if this is an obvious one. We have a Typo3
> site set up. There's a root template and several of the pages below
> have their own +Ext pages.
>
> I need to add some code to the home page (owner of the root template)
> but I don't want this to propagate to the sub pages. I created a +EXT
> template on the home page and added the code below
>
> page.bodyTag = <body class="homePopup">
>
> For some reason this is not working, the code never gets applied to the
> home page (cleared cache, temp internet files etc to no avail). If I
> add the above line to the root template it works fine but it then
> applies to all pages which I don't want. If I add it to a +EXT file on
> any other page it works.
>
> Any help appreciated
> gR
as Richard mentioned: only one TS-Template per page (last wins).
but there are some helps:
1. divide your TS-configuration.
either in smaller templates in a sysfolder, which can be included as
static templates
or as single files which can be included in individual TS-templates or
included in include-files.
so you can build up a hierarchy of TS-templates which can be build up/
included very individually.
in this way you have one TS-template in your root-page which just
includes one 'master'-template (which includes other sub-templates)
in the TS-templates records you can include other templates just for the
next level (= all subpages but not the current page)
2. the other way to restrict some TS to single pages (or subtrees) are
conditions depending on page-IDs:
[page|uid = 123]
http://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Reference/Index.html#id40
[PIDinRootline = 123]
http://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Reference/Index.html#condition-pidinrootline
[PIDupinRootline = 123]
http://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Reference/Index.html#condition-pidupinrootline
[globalVar = TSFE:id = 123]
http://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Reference/Index.html#condition-globalvar
3a. you can use stdWrap-functions .if to set individual values depending
on special values (which may be the page-id):
http://docs.typo3.org/typo3cms/TyposcriptReference/Functions/If/Index.html
(in conjunction with .override, as single values in COA)
3b. you may use CASE
http://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Case/Index.html
bernd
--
http://www.pi-phi.de/cheatsheet.html
More information about the TYPO3-english
mailing list