Dynamicly change TYPO3 fluid Layout by typeNum -


i using extension fluidpages , want switch layout typenum. possible change f:layout by condition? wont work:

<f:layout name="{f:if(condition: '{typenum} == 666', then: 'pageajax', else: 'page')}"/> 

suggested approach:

<f:layout name="page/{typenum}"/>

required files:

  • resources/private/layouts/page/0.html
  • resources/private/layouts/page/666.html

please note: works if {typenum} variable guaranteed exist - if not, face "template file not found" error empty filename. avoid this, can use vhs extension's v:var.convert viewhelper ensure proper value:

<f:layout name="page/{typenum -> v:var.convert(type: 'integer')}"/>


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -