[TYPO3] Using COA for configuring one's extension
Francois Suter
fsuter at cobweb.ch
Sat Jul 19 23:01:12 CEST 2008
Hi Xavier,
> The goal is being able to get this from TS using this syntax:
>
> 10 = FILEINFO
> 10.file = fileadmin/somefile.wav
> 10.metadata.field = ID3:Title // ID3:Artist
If you load your data in the content object's data
(tslib_content::data), then you have it available to work in TypoScript.
This can be done by directly accessing this "data" array or by calling
the start() method of an instance of tslib_content and passing it a full
PHP array. Example:
$metadata = array('data1' => 'foo', 'data2' => 'bar');
$localCObj = t3lib_div::makeInstance('tslib_cObj');
$localCObj->start($metadata);
Then in your TS you can use something like:
10 = TEXT
10.field = data1
and that will render as "foo".
HTH
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
More information about the TYPO3-english
mailing list