Issue Bug Closed

#78548Dynamic variables access does not work as with standalone version

Andreas Allacher 11/02/16, 16:47 updated 10/17/17, 23:31

Description

TYPO3 fluid now has the support to access dynamic variables like:

./bin/fluid

<f:alias map="{foo: 'Hello World', bar: 'o'}">
        #{f{bar}o}#
    </f:alias>
^D

#Hello World#

More enteresting probably to use it for array / object access.

However, this doesn’t work with TYPO3 CMS (latest master) because it overwrites the variable provider:
$this->setVariableProvider($objectManager->get(CmsVariableProvider::class));

This should also work TYPO3 CMS.

ObjectAccess is probably required because of ObjectStorage but I guess the main required part here is:
\TYPO3Fluid\Fluid\Core\Variables\VariableExtractor::resolveSubVariableReferences.

Maybe extending the VariableExtractor and modifying getByPath accordingly would be the way to solve this.

Reviews 1