[TYPO3-performance] Typoscript with conditions or ext template on page
masi-no at spam-typo3.org
Tue Dec 15 16:16:26 CET 2009
Michiel Roos [netcreators] schrieb:
> Op 12/15/09 1:42 PM, Martin Kutschker schreef:
>> Mathias Schreiber [wmdb >] schrieb:
>>> Sven Wolfermann schrieb:
>>>> sample constants condition:
>>>> [PIDinRootline = 703]
>>>> homeID = 703
>>>> catId = 1,6,18
>>>> showListId = 946
>>>> showEventId = 945
>>>> newsSingle = 3343
>>>> newsFolder = 353,248,53
>>>> plugin.tx_cal_controller.pidList = 2476,1457,1954
>>> Ext Templates are faster, since conditions are parsed (uncached) at any
>>> page request.
>>> A lot of things are only possible with conditions AND ext Templates are
>>> a bit more "chaotic" to find.
>>> Basically I like to keep my stuff at one place only.
>> A matter of taste. I don't like PIDinRootline at all. PIDs mean nothing to me (without a further
>> comment in the TS) when I try to understand the TS code. So I prefer ext templates for branches.
> We use constants instead of PIDs.
> On the template in the site root we have the constants:
> newsPage = 1
> newsSinglePage = 2
> someOtherPage = 3
> And then in the ext templates we use those constants in the conditions.
Right. Try to use constants before you use conditions or multiple TS setups.
More information about the TYPO3-performance