[TYPO3-dev] Render fluid template from a string instead of a file

Christian Ludwig cl at viazenetti.de
Thu Nov 6 21:32:35 CET 2014


Hi,

I am looking for an easy way to use the
TYPO3\CMS\Fluid\View\StandaloneView class to render a fluid template
that comes from another source (database) instead from a file.

Normally you simply use the setTemplatePathAndFilename() method to
'load' a template from a file, now what I want is read the fluid
template from database assign variables and return the rendered string.
In addition it would be great to be able to use a layout from file.

When looking into the code, it seems like it is not possible to do so
without extending the AbstractTemplateView and overwriting the render
method.

Has anyone any other ideas or a ready to use code?

Thanks
Christian



More information about the TYPO3-dev mailing list