[Typo3] extension get values from fce-fields

Dmitry Dulepov typo3 at fm-world.ru
Thu Sep 29 12:36:39 CEST 2005


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.



More information about the TYPO3-english mailing list