[TYPO3-50-general] TypoScript 2.0 syntax

Robert Lemke robert at typo3.org
Mon Jun 11 16:17:03 CEST 2007


Hi Ingo and Elmar,

Am 11.06.2007 um 15:30 schrieb Elmar Hinz:

>>> I suggest that we also define TRUE and FALSE as constants.
>> what for? they're natural constants anyways!
>> light is either off OR on, there's not half on
>
> I guess what Robert want's to say is, that TRUE and FALSE in  
> Typoscript
> eval to strings without additional treatment. Like everything I  
> expect. So
> he probably uses a kind of list, to tell, wich string tokens should be
> treated as PHP constants, wich as integers and so on.
>
> What kind of list this is, depends on the technique he uses to  
> compile the
> TS input. In a classical compiler it would simply be the set valid  
> tokens
> and their matching types.

Right. The TS parser will assume that a value it finds in an  
assignment which
consists of only uppercase characters is a (TypoScript-) constant.  
Like in
TypoScript 1 you can define constants which can be used everywhere in  
the
TypoScript definitions.

To implement a feature like assigning NULL, TRUE or FALSE, it's  
sufficient
to predefine such a TypoScript constant and set it to the respective  
value.

robert
-- 
http://typo3.org/gimmefive




More information about the TYPO3-project-5_0-general mailing list