[Typo3-dev] Setting a value for a condition via TS

JoH info at cybercraft.de
Fri Feb 25 17:50:45 CET 2005


>> But how do I use this value in a condition?
>> The problem is, that I have to set a value for a property that
>> hasn't got stdWrap properties depending on a value taken from a
>> field.
>>
> Check for "if" TS-Ref. p.31.
> Should make what you want.

Nope - "if" can only be used in two cases:
1. The property or object has "if" as a property
2. The property or object has "stdWrap" properties

In my case it's the "params" property of IMAGE that I need to be filled with
different parameters based on two fields: image_effects and
image_compression.
Since "params" can only be filled with simple text with no cObject or
stdWrap available I have to do it in another way.

temp.whatever = -rotate 90

10 = IMAGE
10.params < temp.whatever

works, but I am not able to fill temp.whatever based on a field value since

temp.whatever = CASE
temp.whatever {
key.field = image_effects
1 = -rotate 90
2 = -rotate -90
...
and so on
...
}

10 = IMAGE
10.params < temp.whatever

doesn't work.

I can't use IMGTEXT since it's exactly the object IMGTEXT I am going to
replace by my own TS-setup to get fully valid XHTML with Bobby AAA approval.
Works perfectly fine with all features except those two fields.
I personally never used them, but since it should be a solution for possible
clients, I need those params.

Joey






More information about the TYPO3-dev mailing list