[TYPO3-dev] help with Flexform
Bartosz Aninowski
bartoszx at SPAMgmail.com
Wed Apr 22 07:41:41 CEST 2009
Stephane Baribeau pisze:
> Hi everyone,
>
ext_tables.php
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1']='pi_flexform';
t3lib_extMgm::addPiFlexFormValue($_EXTKEY.'_pi1','FILE:EXT:my_ext/flexform_ds_pi1.xml');
class....pi1.php
$this->pi_initPIflexForm();
$code =
$this->pi_getFFvalue($this->cObj->data['pi_flexform'],'what_to_display','sDEF');
//echo $code;
flexform_ds_pi1.xml
<T3DataStructure>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:my_ext/locallang_db.xml:tx_myext.option</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<what_to_display>
<TCEforms>
<label>LLL:EXT:my_ext/locallang_db.xml:tx_myext.show</label>
<config>
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">SINGLE</numIndex>
<numIndex index="1">SINGLE</numIndex>
</numIndex>
</items>
<maxitems>1</maxitems>
<size>1</size>
<multiple>1</multiple>
<selectedListStyle>width:150px</selectedListStyle>
<itemListStyle>width:150px</itemListStyle>
</config>
</TCEforms>
</what_to_display>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
--
Bartosz Aninowski
typo(3)holics
http://techblog.evo.pl
More information about the TYPO3-dev
mailing list