[TYPO3-project-4-3] Variation for TypoScript "if"

Tyler Kraft tyler.kraft at netefficiency.co.uk
Thu Jun 11 17:49:56 CEST 2009



> Just to get it right. You do not understand this expression?
> 
> if = ( $a AND $b ) OR ( $c and $d )

I understand that fine but it is not what you wrote, is it? What you 
wrote was this:

if = {a} > {b} || {c}
if.a = value:42
if.b = object:TEXT
if.b.value = 123
if.c = function:inList
if.c.needle = l
if.c.haystack = w,o,r,d

This is far more complicated looking and the fact that you are now using 
the terms needle and haystack clearly implies a much more programmatic 
approach that would rely upon the user having programming knowledge. As 
well what is the point of having two cases for 'and'?



> Also no offence meant. This one is obvious for all programmers and those
> who know/remember a bit about formal logic from school.

I'm not sure that my masters in a maths based subject puts me at a 
disadvantage when it comes to logic here.... So I'm not sure what's 
being implied....

Given the choice, what you wrote looks far more difficult to use than 
what Joey is purposing.





> If this is so, then maybe we have to target for to groups of users.
> Those trained in formal logic (ie programmers) and those that are not.

You already have that option - 'if' will allow you to use a function to 
do a check. so why then reinvent this wheel?


> I tried to enhance the syntax with formal logic in mind and didn't think
> about a natural language approach.

But that's the point of typoscript - that one doesn't need to have 
programming (or as you say formal) knowledge. It's goal as far as I 
always knew way to allow complex configuration for the non-programmer.

Just my 2cents



More information about the TYPO3-project-4-3 mailing list