Automating Backend Layout Assignments in TYPO3 using Page TSconfig
Learn how to use config.defaultBackendLayout in TYPO3 Page TSconfig to automate backend layout assignments, ensuring consistent page structures across your site.
04 Jul 2026, 22:04 UTC

The Problem: Manual Layout Selection Fatigue
In large TYPO3 installations, editors frequently forget to select the correct Backend Layout when creating new pages. This leads to inconsistent content structures, broken design patterns, and a reliance on administrators to manually fix page properties after the content has already been entered. The goal is to ensure that every new page created within a specific site or section automatically inherits a predefined layout without manual intervention.
The Solution: config.defaultBackendLayout
The most efficient way to solve this is by using config.defaultBackendLayout within your Page TSconfig. This directive tells the TYPO3 Backend Page module which layout ID to pre-select in the Page Properties dialog the moment a new page is created. Because TSconfig is hierarchical, you can apply a global default for the entire site or specific defaults for different branches of your page tree.
Implementing the Default Layout
To implement this, you must first ensure the layout is defined in the mod.web_layout.BackendLayouts namespace and then assign that layout's ID as the default. This configuration is typically placed in your site package under Configuration/TypoScript/setup.tsconfig and loaded into the system via the config.includeTSconfig directive.
# 1. Define the Backend Layout structure
mod.web_layout.BackendLayouts.100 {
title = "Standard Two-Column Layout"
cols = 2
rows = 1
col = 0 {
width = 66.66%
}
col = 1 {
width = 33.33%
}
}
# 2. Assign the layout ID as the default for new pages
config.defaultBackendLayout = 100
Applying Conditional Defaults
In complex sites, you may want different defaults based on the page's context. While config.defaultBackendLayout is a static assignment, you can use conditional TSconfig to vary the default based on the parent page's properties or other environment variables.
# Apply a specific layout only if the page is created under a specific condition
[pageType == 0]
config.defaultBackendLayout = 100
[end]
Technical Execution and Permissions
To apply these changes, follow these steps:
- File Location: Place the code in your site package's TSconfig file. If you are testing quickly, you can enter it directly into the "Page TSconfig" field of the Root page in the Backend.
- Permissions: You must have administrative access to the TYPO3 Backend or write access to the site package filesystem.
- Deployment: After updating the file, clear the system caches (specifically the
system.cache) to ensure the Backend Page module reads the updated configuration stack.
Limitations and Common Pitfalls
When implementing automated layouts, be aware of the following technical constraints:
Non-Retroactive Application
The config.defaultBackendLayout directive only triggers during the creation of a page. It will not update existing pages that were created before the configuration was deployed. To update existing pages, you must manually change the layout or use a database update script.
Silent Failures
TSconfig syntax errors do not trigger standard PHP exceptions. If you misspell config.defaultBackendLayout or use an ID that does not exist in mod.web_layout.BackendLayouts, TYPO3 will silently revert to the system default (usually no layout) without notifying the administrator.
Inheritance Overwrites
Because TSconfig is merged from the root down to the leaf page, a configuration set at the root can be overwritten by a more specific configuration set on a sub-page. If a child page is not receiving the expected default, check the "Page TSconfig" field of all parent pages in the hierarchy.
Verification Process
To verify the configuration is working correctly, perform these three checks:
- The Creation Test: Create a new page in the backend. Open the "Page Properties" window and verify that the "Backend Layout" dropdown is already set to your defined layout.
- The Object Browser Check: Navigate to the "TypoScript Object Browser" in the backend. Search for
config.defaultBackendLayoutto ensure the value is being read correctly from the configuration stack. - Inheritance Audit: Create a page in a different branch of the tree to confirm that the layout is inheriting from the root as expected, or being correctly overridden by a branch-specific config.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.