[TYPO3-mvc] How to select fluid templates (in extbase extensions) depending on the used backend layout of the current page?

Roland most.wanted at gmx.at
Fri Aug 24 10:58:37 CEST 2012


hi everybody,

i would like to use different fluid templates in my extbase extension 
depending on the used backend layout on the page where the frontend 
plugin is inserted.

the "used" backend layout could be determined like this:

lib.currentBackendLayoutUid = TEXT
     field = backend_layout
     ifEmpty.cObject = TEXT
     ifEmpty.cObject.data = levelfield: -2, backend_layout_next_level, slide
}

i guess there are at least 2 different approaches:

++ set the templateRootPath
++ use the if viewhelper with a proper condition

...both depending on the "used" backend layout of the current page.

i already tried this:

--- quote ---

<f:if 
condition="{f:cObject(typoscriptObjectPath:'lib.currentBackendLayoutUid')} 
== 7">
     <f:render partial="TemplateForBackendLayout_7" />
</f:if>

--- /quote ---

did not work. i guess the cObject viewhelper would need something like a 
page object used as the data attribute.

can anybody help?

kind regards

roland


More information about the TYPO3-project-typo3v4mvc mailing list