Я добавил пример опечатки.

«долгого пути» с Google, поиском и множеством попыток:

Я создал lib.variable для текущей страницы:

lib.currentPage = TEXT
lib.currentPage.data = page:uid


If I debug it in my FluidTemplate in the Frontend with:

Testing currentPage: <f:cObject typoscriptObjectPath="lib.currentPage" />

I got the correct value.

Now I want to use that Variable in a Condition in my pageSetup.ts like follows:

[DB:pages:lib.currentPage:backend_layout = pagets__pagelayout_logoclaim_subpage]
    page.includeJSFooter.belayoutlogoclaim = EXT:rm_base/Resources/Public/JS/be_logoclaim.js
[end]

I testet this with some other Conditions, but nothing works like expected.

Tested Conditions:

[page|backend_layout = pagelayout_logoclaim_subpage] [globalVar = TSFE:page|backend_layout = pagelayout_logoclaim_subpage]

I also tested the Condition in the TypoScript Object Browser, and here it looks like good working:

TypoScript Object Browser - If I activate the Condition

TypoScript Object Browser

SourceCode in the Frontend on a Site with the correct PageLayout

SourceCode with the correct PageLayout

I need this, because I have two different Menus, and they need different JavaScripts, to avoid wrong behaviour in the Frontend.

Update: I inserted the pageLayouts like this:

page = PAGE
page {

    10 = FLUIDTEMPLATE
    10 {
        partialRootPath = EXT:rm_base/Resources/Private/Templates/Fluid/Partials/
        layoutRootPath = EXT:rm_base/Resources/Private/Templates/Fluid/Layouts/

        file.stdWrap.cObject = CASE
        file.stdWrap.cObject {
            key.data = pagelayout

            // Default-Template is LogoFull_Subpage (No Navigation Dependence)
            default = TEXT
            default.value = EXT:rm_base/Resources/Private/Templates/Fluid/LogoFull_Subpage.html

            // LogoClaim - Subpage
            pagets__pagelayout_logoclaim_subpage = TEXT
            pagets__pagelayout_logoclaim_subpage.value = EXT:rm_base/Resources/Private/Templates/Fluid/LogoClaim_Subpage.html
        }
    }

You see: The Backendlayouts are in Files of my Extension, not in the Database-Table: backend_layouts.

Update 2:

I would prefer a TypoScript-Way, if someone knows how - with external BE-Layouts. Thank you.

Ответы на вопрос(4)

Ваш ответ на вопрос