[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
Mon Aug 27 11:59:46 CEST 2012
this is weird.
i guess this could/must be a bug in:
++ Tx_Fluid_ViewHelpers_CObjectViewHelper
or
++ cObjGetSingle() of class tslib_cObj
this is my FLUID template snippet:
--- quote ---
<f:if
condition="{f:cObject(typoscriptObjectPath:'lib.currentBackendLayoutUid')}
== 7">
<f:then>
<f:render partial="TemplateForBackendLayout_7" />
</f:then>
<f:else>
<f:render partial="TemplateForBackendLayout_default" />
</f:else>
</f:if>
--- /quote ---
with this it works like expected:
--- quote ---
lib.currentBackendLayoutUid = TEXT
lib.currentBackendLayoutUid {
data = field:backend_layout
ifEmpty.cObject = TEXT
ifEmpty.cObject.data = levelfield: -2, backend_layout_next_level, slide
}
--- /quote ---
debugging
{f:cObject(typoscriptObjectPath:'lib.currentBackendLayoutUid')} in my
FLUID template returns the current backend layout of the page. OK.
with this it does not work like expected:
--- quote ---
lib.currentBackendLayoutUid = TEXT
lib.currentBackendLayoutUid {
field = backend_layout
ifEmpty.cObject = TEXT
ifEmpty.cObject.data = levelfield: -2, backend_layout_next_level, slide
}
--- /quote ---
debugging
{f:cObject(typoscriptObjectPath:'lib.currentBackendLayoutUid')} in my
FLUID template returns the parent's backend_layout_next_level. NOT OK.
More information about the TYPO3-project-typo3v4mvc
mailing list