[TYPO3-templavoila] <proc> for the whole FCE

Chris Müller mueller at cyperfection.de
Thu Feb 24 16:31:26 CET 2011


Hi Sebastian,

I solved that this way:

Template:
<div>
   <div class="teaser teaser-red">
     ... other mappings ...
   </div>
</div>

Then map the first <div> as inner root and the second div (with the 
class) as attribute (AT) and select the action "ATTRIBUTE "class" ...".

In the data structure you can now use the following:

<field_yourfield type="array">
   <type>attr</type>
   <tx_templavoila type="array">
     <title>Your title</title>
     <eType>select</eType>
   </tx_templavoila>
   <TCEforms type="array">
     <label>Your label</label>
     <config type="array">
     <type>select</type>
       <items type="array">
         <numIndex index="0" type="array">
           <numIndex index="0">white</numIndex>
           <numIndex index="1">teaser teaser-white</numIndex>
         </numIndex>
         <numIndex index="1" type="array">
           <numIndex index="0">red</numIndex>
           <numIndex index="1">teaser teaser-red</numIndex>
         </numIndex>
         <numIndex index="2" type="array">
           <numIndex index="0">green</numIndex>
           <numIndex index="1">teaser teaser-green</numIndex>
         </numIndex>
       </items>
       <default>0</default>
     </config>
   </TCEforms>
</field_yourfield>

Now the value "teaser teaser-xxx" is inserted as css class.

Regards,
Chris.


Am 24.02.2011 15:44, schrieb Sebastian Michaelsen:
> Hey Ron,
>
> simplified it is like this: I have a teaser fce for which the editor can
> choose 1 out of 4 styles (color schemes). I want to wrap the fce into a
> div which holds a class corresponding to the chosen style.
>
> e.g.:
> <div class="teaser teaser-red">
> <h2>Title</h2>
> <p>Content</p>
> </div>
>
> "teaser-red" would be exchanged depending on th chosen style.
>
> Kind regards and thanks in advance,
> Sebastian


More information about the TYPO3-project-templavoila mailing list