[TYPO3-english] Re: Extbase/Fluid extension: viewhelper to return associative array (T3 6.2.4)

Hagen Gebauer gebauer at mpi-cbg.de
Mon Feb 23 08:38:38 CET 2015


Hi Stephan,

thanks a lot. But also these suggestions would not work. Since the Fluid tags you posted are not being html-encoded and thus not visible in the forum, I post your ideas again:

1st idea -- returned NULL:
<namespace:test>
 <h1>Test: {returnValue.a}</h1>
 {returnValue -> f:debug()}
</namespace:test>

2nd idea -- threw an exception ("Namespace could not be resolved. This exception should never be thrown!"):
<f:alias map="{returnValue: '{namespace:test()}'}">
 <h1>Test: {returnValue.a}</h1>
 {returnValue -> f:debug()}
</f:alias>

What does the definition of the namespace do anyway in these examples? How is TYPO3 supposed to know which ViewHelper object to call? As I understand it you usually define a namespace for all ViewHelpers of the extension  and not by the name of a specific ViewHelper:
{namespace whateverName = YourVendorName\YourExtension\ViewHelpers}
You then call the ViewHelpers by their name preceded by their common namespace:
<whateverName:yourViewHelper />

Thanks a lot in advance!

Cheers,
Hagen.


More information about the TYPO3-english mailing list