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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -