[TYPO3-templavoila] FCE: Want user to chose div-layerclass using dropdown - Documentation on 'selector box' ?
Rachel Foucard
rfoucard at w-seils.com
Tue Oct 13 17:39:21 CEST 2009
Hi,
you just have to create a new field with the type "attribute" and the
editing type "selector box". then, you have to mapp it whith the tag you
want and choose the class attribute for the mapping. After saving this, you
can open the Data Structure record and see the generated XML, you will see
something like that :
<field_class_choice type="array">
<type>attr</type>
<tx_templavoila type="array">
<title>Thematic</title>
<sample_data type="array">
<numIndex index="0">[classname]</numIndex>
</sample_data>
<eType>select</eType>
</tx_templavoila>
<TCEforms type="array">
<config type="array">
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0"></numIndex>
<numIndex index="1"></numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">Value 1</numIndex>
<numIndex index="1">Value 1</numIndex>
</numIndex>
<numIndex index="2" type="array">
<numIndex index="0">Value 2</numIndex>
<numIndex index="1">Value 2</numIndex>
</numIndex>
<numIndex index="3" type="array">
<numIndex index="0">Value 3</numIndex>
<numIndex index="1">Value 3</numIndex>
</numIndex>
</items>
<default>0</default>
</config>
<label>Thematic</label>
</TCEforms>
</field_class_choice>
then, you will have to customize the <items> tags : you can add more
numItems and give them custom labels and values(for the index 0 and 1, I
don't remember wich one is for label or value, but just try and see).
that's all.
Rachel Foucard.
http://www.w-seils.com
http://www.q-seils.com
http://typo3-demo.fr
"Thomas Russel" <blueworm01 at gmx.net> a écrit dans le message de news:
mailman.1.1255443927.23670.typo3-project-templavoila at lists.netfielders.de...
> Hello,
>
> I want to create an FCE with a selector box (drop down menu) where the
> user can chose from 3 different classes.
> Depending on their chosing, the div gets a different class.
>
> I guess I have to use the Editing Type "selector box" but I can't find any
> documentation/tutorials how to configure them :-/
>
> Can anyone help ?
>
More information about the TYPO3-project-templavoila
mailing list