PageContentFetchingProcessor

This Data Processor loads all tt_content records from the current backend layout into the template with a given identifier for each colPos, also respecting slideMode or collect options based on the page layouts content columns.

Options

as
Type
string
Required
false
Default
"content"

Name for the variable in the Fluid template.

if
Type
if condition
Required
false
Default
''

Only if the condition is met the data processor is executed.

Example: Use the page-content data processor to display the content

config/sites/my-site/setup.typoscript
page = PAGE
page {
    10 = PAGEVIEW
    10 {
        paths.10 = EXT:my_sitepackage/Resources/Private/Templates/
        dataProcessing.10 = page-content
        dataProcessing.10.as = myContent
    }
}
Copied!

Use the identifiers of the columns in the Fluid template:

EXT:my_sitepackage/Resources/Private/Templates/Pages/Default.html
<f:render partial="Jumbotron" arguments="{jumbotronContent: myContent.jumbotron}"/>
<main>
    <f:for each="{myContent.left.records}" as="contentElement">
        <h3>{contentElement.data.header}</h3>
        <p>{contentElement.data.bodytext -> f:format.html()}</p>
    </f:for>
</main>
<aside>
    <f:render partial="Aside" arguments="{content: myContent.right}"/>
</aside>
Copied!

The backend layout is defined like this:

config/sites/my-site/page.tsconfig
mod.web_layout.BackendLayouts {
    default {
        title = Default
        config {
            backend_layout {
                colCount = 2
                rowCount = 2
                rows {
                    1 {
                        columns {
                            1 {
                                name = Jumbotron
                                colPos = 1
                                identifier = jumbotron
                                slideMode = slide
                                colspan = 2
                            }
                        }
                    }

                    1 {
                        columns {
                            1 {
                                name = Left
                                colPos = 0
                                identifier = left
                            }

                            2 {
                                name = Right
                                colPos = 2
                                identifier = right
                                slideMode = collectReverse
                            }
                        }
                    }
                }
            }
        }
    }
}
Copied!