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

Frans Saris franssaris at gmail.com
Thu Nov 6 21:40:40 CET 2014


Hi Christian,

Try setTemplateSource($string)

Gr. Frans
Op 6 nov. 2014 21:32 schreef "Christian Ludwig" <cl at viazenetti.de>:

> 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
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>



More information about the TYPO3-dev mailing list