[TYPO3-mvc] Determine f:layout dynamically

Jigal van Hemert jigal.van.hemert at typo3.org
Thu Oct 10 15:53:42 CEST 2013


Hi,

On 10-10-2013 14:53, Markus Klein wrote:
> Hi!
>
> It's not so easy. ;-)
>
> My usecase here is to render E-Mails with a Standalone template.
>
> The template shall render HTML and Text E-Mails, hence it should switch the layout.
> <f:layout name="{f:if(condition: isHtml, then:'MailHtml', else:'MailText')}" />

In this case I would use two different formats (like you can set in 
FLUIDTEMPLATE.format). The default format is 'html', which uses the 
template with .html extension. If you switch to format 'txt' fluid would 
use the *.txt templates.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-typo3v4mvc mailing list