Anu Bhuvanendran Nair Anu Bhuvanendran Nair - 3 months ago 24
Javascript Question

TYPO3 Fluid usage in dynamically rendered template

I'm cooking an extension using EXTbase and fluid for TYPO3 v7+ .
I'm here.. because I'm rendering my fluid templates based on certain controller conditions.Under a condition I want something like the html code being rendered from a user supplied template file.

I've used jQuery to bypass the situation..


Guess what.. I got the result I expected,but not really..

<div class="clearfix">
<ul id="image-gallery" class="gallery list-unstyled cS-hidden">
<f:for each="{slider}" as="user" key="label" iteration="iterator">
<li data-thumb="{user.src}">
<f:image crop="{user.crop}" treatidasreference="true" src="{user.filepath}" alt="{user.title}" style="width:100%; height:auto;"></f:image>
<f:if condition="{config.metadata.switch}!= 0">
<f:if condition="{user.title}">
<p class="light-caption" style="background: {config.metadata.opacity}; color: {config.metadata.color}; font-size: {config.metadata.size}%; text-align:{config.metadata.align};">{user.title}</p>

This above is the code resulted.. See, the TypoScript variables are untouched.Little embarrassing.!!

Searching round the clock for an answer.Any ideas ?


In your controller action you can use $this->view->setTemplate('myDynamicTemplateName'); to use a different template than suggested by the action name.

Refer to: