php - Adding TYPO3 backend layout from an extension
I am developing a template for TYPO3 version 7. In the backend I've created several backend layouts. In my template (extension) in the setup.ts I check for the IDs of the backend layout to deliver the correct fluidtemplate.
For a more easy use of the template I want to deliver the backend layouts directly with the extension. How to add backend layouts directly from an extension? How to get or set an id for the backend layouts? So I can map this in my setup.ts?
Answer
Solution:
I normally store the Backend-Layouts in folders to structure the extension.
<INCLUDE_TYPOSCRIPT: source="Path/To/Backendlayout">
)Image: Screenshot of the Structure of the Example
Layout-Setup
The basic Setup for a BE-Layout looks like this:
For example (Default.ts):
At last you need to register your Page configuration:
Typo3 Backend
Now you should be able to see your added Backend Layouts when you edit a page.
Further Actions
If you want to use differnt Templates for every BE-Layout, you can simply do this via the "templateName" porperty in your FLUIDTEMPLATE setup as you can see here: Official TypoScript reference, #templateName
Answer
Solution:
You can provide a class that implements the DataProviderInterface for backend layouts. You must then register that class under the key
This is possible since TYPO3 6.2.
More references: