b13 / doktypemapper
Maps your page.doktype to page.backend_layout
Installs: 47 403
Dependents: 1
Suggesters: 0
Security: 0
Stars: 9
Watchers: 9
Forks: 0
Open Issues: 0
Type:typo3-cms-extension
Requires
- php: ^7.4 || ^8.0
- typo3/cms-backend: ^11.5 || ^12.4 || ^13.1
Requires (Dev)
- saschaegerer/phpstan-typo3: ^1.8
- typo3/coding-standards: ^0.5.5
- typo3/tailor: ^1.1
- typo3/testing-framework: ^7.0 || ^8.0
This package is auto-updated.
Last update: 2024-11-02 10:40:48 UTC
README
EXT:doktypemapper - A TYPO3 Extension for mapping doktypes to backend_layouts
Features
By selecting the doktype
of a page the value of the field backend_layout
is automatically set. There is no need for editors to select a backend_layout
. In fact it is recommended to hide the fields backend_layout
and backend_layout_next_level
from editors.
Find more about how we use this extension at b13, including examples, in this blog post.
Installation
Install this extension via composer req b13/doktypemapper
and activate
the extension in the Extension Manager of your TYPO3 installation.
Once installed, add a new configuration doktype
to your Backend-Layouts.
Configure your Backend-Layouts
Simply add the new configuration doktype
to your Backend-Layout, e.g.
mod.web_layout.BackendLayouts.MyPage.config.backend_layout.doktype = 144
This will automatically set the backend_layout
to pagets__MyPage
when a page has doktype 144
.
Hide fields from editors
It is recommended to hide the fields backend_layout
and backend_layout_next_level
from page properties (the value is set automatically) using PageTsConfig:
TCEFORM.pages.backend_layout.disabled = 1
TCEFORM.pages.backend_layout_next_level.disabled = 1
Note
This extension comes with a default empty backend_layout configuration (see Configuration/PageTs/main.tsconfig
) for
TYPO3's default "empty" page types (like Shortcut, External Link, etc.) to ensure valid database entries for every page
type (even the ones without any content).
Credits
This extension was created by Achim Fritz in 2021 for b13 GmbH, Stuttgart.
Find more TYPO3 extensions we have developed that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.