georgringer/belayout_fileprovider

how to use token with backend layouts right?

Opened this issue · 1 comments

Hi Georg,

i have tried to use your provided code snippet to be able to select the layouts in the PAGE area but without success, it does not working. i am using typo3 6.2 in this case:

10 = FLUIDTEMPLATE
10 {
file.stdWrap.cObject = TEXT
file.stdWrap.cObject {
data = levelfield:-2,backend_layout_next_level,slide
override.field = backend_layout
split {
token = file__
1.current = 1
1.wrap = |
}
wrap = EXT:modernpackage/Resources/Private/Templates/|.html
}
layoutRootPath = EXT:modernpackage/Resources/Private/Templates/Layouts/
variables {

}

}

i am not the professional, so is there a way to make it work?

thanks Ludwig

Hi,
sad not to get any response, but anyway, here a solution what works at least for me

// with this you can use this where ever you want 
lib.currBackendLayout = TEXT
lib.currBackendLayout {
    data            = levelfield:-2,backend_layout_next_level,slide
    override.field  = backend_layout
    split {
        token       = {$global.themeName}__
        1.current   = 1
        1.wrap      = |
    }
}

page    = PAGE
page {
    10 = FLUIDTEMPLATE
    10 {
        file.stdWrap        < lib.currBackendLayout
        file.stdWrap.wrap   = EXT:{$global.themeName}/{$global.pathResourcesPrivate}/Layouts/|.html

        partialRootPath     = EXT:{$global.themeName}/{$global.pathResourcesPrivate}/Partials
        layoutRootPath      = EXT:{$global.themeName}/{$global.pathResourcesPrivate}/Layouts

        variables {

            layout < lib.currBackendLayout

        }
    }

cheers Ludwig