This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Usage in TypoScriptΒΆ

The identifier can easily be used to determine which page template to use for the frontend rendering:

1 {
  pageLayout.cObject = TEXT
  pageLayout.cObject {
    data = levelfield:-1, backend_layout_next_level, slide
    override.field = backend_layout
    split {
      token = sitepackage__
      1.current = 1
      1.wrap = |

10 {
  file = EXT:sitepackage/Resources/Private/Templates/Templates/Main.html
  format = html
  partialRootPath = EXT:sitepackage/Resources/Private/Templates/Partials
  layoutRootPath = EXT:sitepackage/Resources/Private/Templates/Layout

  variables {
    layout = TEXT = register:pageLayout

The LOAD_REGISTER part fetches the field in the current page, if necessary from pages further up in the rootline and takes into consideration the backend_layout_next_level setting. After that it removes the prefix and the two underscores to end up with the name of the layout.

In the Fluid template it's now easy to use the correct template, which we simply give the same name as the backend layout:

<f:render partial="{layout}" arguments="{_all}"/>

The arguments attribute forwards all variables to the partial.