[Typo3] extension get values from fce-fields
Henry Wilhelm
henry at hexhe.de
Thu Sep 29 12:59:19 CEST 2005
Dmitry Dulepov schrieb:
> Hi!
>
> Henry Wilhelm wrote:
>
>>at first i have a FCE with two fields and i would like to get the values
>>of both fields with a php-script, not with typoscript.
>>So i made a simple extension and included it in the setup of the page:
>>
>> $img = $this->pi_getFFvalue($this->cObj->data['pi_flexform'],
>>'field_img', 'sDEF');
>
>
> This is for flexform, not for Templavoila FCE! You need to read
> Templavoila's own field, convert it from xml to array and get values
> from array. code will be similar to:
>
> $flexFormXML = $tt_content['tx_templavoila_flex'];
> $dataArray = t3lib_div::xml2array($flexFormXML);
> $value = $dataArray['data']['sDEF']['lDEF']['field_mysomething']['vDEF'];
>
> Replace $tt_content with a record from tt_content.
>
> Dmitry.
Hi, Dmitry,
sounds very logical to me, but now - sorry - i don't know what you mean
with "Replace $tt_content with a record from tt_content." I think you
mean somethink like the ID (perhaps UID) of the current record? But if
so, how can i get the uid of the current record via php? Could you
please give me an example? I hope, this will be my last question...
Henry
More information about the TYPO3-english
mailing list