Frontendlayouts for Bodyclasses

If you want for a specific page a specific layout or other custom things, you can add body classes. In TYPO3 you can add a class via Frontendlayouts.

PageTS

### 0 = Default
TCEFORM.pages.layout {
    addItems {
        1 = Features
        2 = Stories
        3 = Pricing
    }
    altLabels {
        1 = Features
        2 = Stories
        3 = Pricing
    }
}

SetupTS

[page|layout = 1]
page.bodyTagCObject = COA
page.bodyTagCObject.wrap = <body class="features-page">
}
[end]
[page|layout = 2]
page.bodyTagCObject = COA
page.bodyTagCObject.wrap = <body class="stories-page">
}
[end]
[page|layout = 3]
page.bodyTagCObject = COA
page.bodyTagCObject.wrap = <body class="pricing-page">
}
[end]

Last updated

Copyright 2024 - jseidl.at Julian Seidl