[TYPO3-ect] Alternatives to TS
Bernhard Kraft
kraftb at kraftb.at
Thu May 18 12:29:29 CEST 2006
Ries van Twisk wrote:
> myMenu = HMENU
> myMeny.1 = GMENU
> if (myMenu.isEmpty) {
> myMenu = TEXT
> myMenu.value = sorry, emty menu
> }
I think the real reason why kasper was a little bit "conservative" with the "if" is:
CACHING.
If you ever took a look into the parts of T3 which are responsible for caching: tslib_fe.php and
consorts. You will surely have noticed what an enormous effort is given to let at least [conditions]
work and still allow caching.
Sometimes there are postings in the NG like: I insert a username into the site using TS but when I log
in as another the name stays the same .... And this is simply realted to caching.
If you would know introduce "if" conditions which can not only define the outcome of a page dependend on
actual filled in content but also on "arbitrary" conditions you will end up with lots of people with lots
of problems asking why invalid content get's shown (until the clear the cache again or set no_cache=1).
And to handle the issue of the original posting: Why should XML be no option for an TS alternative ?
<setup>
<conditionalBlock>
<condition>globalVar = GP:id=123</condition>
<code>
<object name="lib.whatever">< lib.parseFunc_RTE</object>
<object name="temp.whatever">
<value>COA</value>
<object name="10">
<value>TEXT</value>
<object name="dataWrap">
<value>Username : {global:TSFE|fe_user|user|username}</value>
</object>
</object>
</object>
<code>
</conditionalBlock>
</setup>
you see that more than one statement is included in the conditional block ...
greets,
Bernhard
--
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------
[[ http://think-open.at | Open source company ]]
More information about the TYPO3-team-extension-coordination
mailing list