[TYPO3-dev] TypoScript TSFE data array and Fluidtemplate
JoH asenau
info at cybercraft.de
Wed Feb 13 01:19:35 CET 2013
Am 19.12.2011 16:26, schrieb Steffen Müller:
> Hi.
>
> On 14.12.2011 12:52 Helmut Hummel wrote:
>>
>> But you could create a small extension implementing this hook:
>>
>> $TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['getData']
>>
>>
>> so that the following could work:
>>
>> fe_user = TEXT
>> fe_user.data = globalArray:TSFE|fe_user|user
>>
>
> I played around with this a while.
>
> Unfortunately your suggestion won't work. The value from fe_user is
> parsed with stdWrap which always returns string. So with your example I
> get $value='Array';
This is due to the fact that variables in FLUIDTEMPLATE are passed
through cObjGetSingle, which is silently converting arrays into the
string "Array" due to the usage of
$content .= blah
Since any line dealing with $content inside cObjGetSingle is doing it
like that, you will always get a string.
On the other hand stdWrap alone would happily provide you with the
desired array, so IMHO the variables section of FLUIDTEMPLATE is buggy,
since it can not deal with stdWrap without assigning a full cObject.
Usually both should be working:
variables {
myvariable = WHATEVER
myvariable.field = arrayfield
myvariable2.field = arrayfield
}
But with the current implementation the first one will give you "Array"
and the second one will be ignored, which makes it impossible to hand
over datasets to make use of the really sophisticated FLUID functionality.
I can provide a fix for that, if necessary. What do you think?
Cheers
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
More information about the TYPO3-dev
mailing list