[TYPO3-performance] Typoscript with conditions or ext template on page
Martin Kutschker
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
>>>> [end]
>>> Ext Templates are faster, since conditions are parsed (uncached) at any
>>> page request.
>>>
>>> Drawback:
>>> 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.
>>
>> Masi
>
> 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.
Masi
More information about the TYPO3-performance
mailing list