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

JoH info at cybercraft.de
Fri Feb 25 19:50:10 CET 2005


>> 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.

Have to correct myself here: it's "params" of imgResource not IMAGE ...

>>
>> 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.
>
> as both are properties of IMAGE it's not clear to me why you can't do
> it similar
>
> 10=IMAGE
> 10{
> image_compresssion.field=which.field.you.whish
> }

Well - unfortunately this doesn't work, since image_compression and
image_effects are only known to IMGTEXT.
IMAGE has the possibility to set those IM params in the file property.

10 = IMAGE
10 {
    file {
        params = -rotate 90
    }
}

But there is no stdWrap available for params so that
params.field = whatever
doesn't work. But I could do something similar using conditions

[image_effects = 1]
10.file.params = -rotate 90
[image_effects = 2]
10.file.params = -rotate -90
[image_effects = 3]
10.file.params = -rotate 180
[global]

The only thing I need to know is: How do I get a value from a field into
this condition?

Joey







More information about the TYPO3-dev mailing list