TYPO3 Logo
TYPO3 Core Changelog
Options
Give feedback View source How to edit Edit on GitHub Full documentation (single file)

TYPO3 Core Changelog

  • ChangeLog v14
    • 14.2 Changes
    • 14.1 Changes
    • 14.0 Changes
    • 14.x Changes by type
  • ChangeLog v13
    • 13.4.x Changes
    • 13.4 Changes
    • 13.3 Changes
    • 13.2 Changes
    • 13.1 Changes
    • 13.0 Changes
    • 13.x Changes by type
  • ChangeLog v12
    • 12.4.x Changes
    • 12.4 Changes
    • 12.3 Changes
    • 12.2 Changes
    • 12.1 Changes
    • 12.0 Changes
    • 12.x Changes by type
  • ChangeLog v11
    • 11.5.x Changes
    • 11.5 Changes
    • 11.4 Changes
    • 11.3 Changes
    • 11.2 Changes
    • 11.1 Changes
    • 11.0 Changes
    • 11.x Changes by type
  • ChangeLog v10
    • 10.4.x Changes
    • 10.4 Changes
    • 10.3 Changes
    • 10.2 Changes
    • 10.1 Changes
    • 10.0 Changes
    • 10.x Changes by type
  • ChangeLog v9
    • 9.5.x Changes
    • 9.5 Changes
    • 9.4 Changes
    • 9.3 Changes
    • 9.2 Changes
    • 9.1 Changes
    • 9.0 Changes
    • 9.x Changes by type
  • ChangeLog v8
    • 8.7.x Changes
    • 8.7 Changes
    • 8.6 Changes
    • 8.5 Changes
    • 8.4 Changes
    • 8.3 Changes
    • 8.2 Changes
    • 8.1 Changes
    • 8.0 Changes
    • 8.x Changes by type
  • ChangeLog v7
    • 7.6.x Changes
    • 7.6 Changes
    • 7.5 Changes
    • 7.4 Changes
    • 7.3 Changes
    • 7.2 Changes
    • 7.1 Changes
    • 7.0 Changes
    • 7.x Changes by type
  • Documenting Changes
  • Sitemap
  1. TYPO3 Core Changelog
  2. ChangeLog v14
  3. 14.2 Changes
  4. Feature: #104974 - Content area related information in the frontend
Give feedback Edit on GitHub

Feature: #104974 - Content area related information in the frontend 

See forge#104974

Description 

With Feature: #103504 - New ContentObject PAGEVIEW the new PAGEVIEW cObject has been introduced for the Frontend Rendering. It's a powerful alternative to the FLUIDTEMPLATE cObjct and allows to render a full page with less configuration.

The PAGEVIEW has now been further extended and does also provide all content elements, related to the page, grouped by their corresponding columns as defined in the page layout. The elements are provided as fully resolved Record objects (see Feature: #103783 - RecordTransformation Data Processor and Feature: #103581 - Automatically transform TCA field values for record objects).

The elements are attached to the new ContentArea object, which beside the elements itself also contains all the column related information and configuration. This is quite useful for the frontend rendering, because it might be important for an element to know in which context it should be rendered. With this information, an element can e.g. decide to not render the Header partial if it is included in the sidebar content area.

The ContentArea objects are added to the view using either the variable name defined via contentAs or falls back to content. The content elements can then be accessed via the records property.

The ContentArea's' contain all the backend layout related configuration, such as the content restrictions, which allows further validation, e.g. if the given content types are actually valid.

{content.main.records} can therefore be used to get all content elements from the main content area. main is the identifier, as defined in the page layout and content is the default variable name.

Important

The ContentArea objects are attached in the ContentAreaCollection which implements the PSR-11 ContainerInterface to allow access to the areas via get(). To optimize performance, the ContentArea objects itself are instantiated only when accessed (lazy loading).

By accessing the ContentArea with {content.main} the following information is available (as defined in the page layout):

  • identifier - The column identifier
  • colPos - The defined colPos
  • name - The (speaking) name, which might be a locallang key
  • allowedContentTypes - The defined allowedContentTypes
  • disallowedContentTypes - The defined disallowedContentTypes
  • slideMode - The defined ContentSlideMode, defaults to ContentSlideMode::None
  • configuration - The whole content area related configuration
  • records - The content elements as Record objects

The following example is enough to render content elements of a page with a single column:

mod.web_layout.BackendLayouts {
  default {
    title = Default
    config {
      backend_layout {
        colCount = 1
        rowCount = 1
        rows {
          1 {
            columns {
              1 {
                name = Main Content Area
                colPos = 0
                identifier = main
              }
            }
          }
        }
      }
    }
  }
}
Copied!
page = PAGE
page.10 = PAGEVIEW
page.10.paths.10 = EXT:my_site_package/Resources/Private/Templates/
Copied!
<f:for each="{content.main.records}" as="record">
    <f:render partial="ContentElement" arguments="{record: record, area: content.main}">
</f:for>
Copied!

Introducing ContentArea also improves the AfterContentHasBeenFetchedEvent - used to manipulate the resolved content elements of each area - by having additional context at hand.

Impact 

It's now possible to access all content elements of a page, grouped by their corresponding column, while having the column related information and configuration at hand. Next to less configuration effort, different renderings for the same element, depending on the context, are easily possible.

Example 

A content element template using the Default layout and rendering the Header partial only in case it has not been added to the sidebar column.

<f:layout name="Default" />

<f:section name="Main">
    <f:if condition="{area.identifier} != 'sidebar'">
        <f:render partial="Header" arguments="{_all} />
    </f:if>

    <p>{record.text}</p>
    <f:image image="{record.image}" width="{area.configuration.imageWidth}" />
</f:section>
Copied!
  • Previous
  • Next
Reference to the headline

Copy and freely share the link

This link target has no permanent anchor assigned. You can make a pull request on GitHub to suggest an anchor. The link below can be used, but is prone to change if the page gets moved.

Copy this link into your TYPO3 manual.

  • Home
  • Contact
  • Issues
  • Repository

Last rendered: Feb 04, 2026 19:43

© since 1997 by the TYPO3 contributors
  • Legal Notice
  • Privacy Policy