TYPO3 Fluid: Create additional backend layouts
Next, you'll create two additional backend layouts. One for each new content template you have created. Click on list, click on "storage folder" and click on the green plus next to the existing backend layout to add a new backend layout on the root page and end up with:
For the first new backend layout, put "Main 1 column without menu" in the title field, and add the following to the Config field:
backend_layout {
colCount = 1
rowCount = 1
rows {
1 {
columns {
1 {
name = Content main (without menu)
colPos = 0
}
}
}
}
}
You'll end up with this:
Please note: for recent versions of TYPO3, you can only enter the column name and the column number by clicking the pencil in the config window. In this example, the name will be Content main (without menu) and the column number will be 0.
You may have noticed that the Config part of this backend layout is almost exactly the same as the Config part of the existing backend layout with menu! Well, that's correct. The backend layout is the same, both layouts have one row and one content column, but the content template file they link to is different. You will use the backend layout, not only to indicate what backend layout you want to use for a page, but also to indicate which frontend layout will be used for that page! This will be clear in a minute. Hopefully.
First, create another backend layout. Put "Main 2 column without menu" in the title field, and add the following to the Config field:
backend_layout {
colCount = 2
rowCount = 1
rows {
1 {
columns {
1 {
name = Content column 1
colPos = 1
}
2 {
name = Content column 2
colPos = 2
}
}
}
}
}
You'll end up with this:
Please note: for recent versions of TYPO3, you can only enter the column name and the column number by clicking the pencil in the config window. In this example, the name will be Content column 1 and the column number will be 1. To add another column, press the "plus" button on the right, click the pencil again and enter a name Content column 2 and a column number 2.
A note on backend layouts. Hiding a backend layout doesn't keep TYPO3 from using it.
Please note: if you use the layouts "without menu" for certain pages, these pages won't have a menu when visited on a mobile device. In other words: the user won't be able to navigate to other pages. This is due to the fact that the TYPO3Buddy tutorial once was desktop only.
Next step: update the typoscript "Main template" to use the newly created templates ->
Kind reminder! This tutorial has been tested with and updated for TYPO3 v10. Please keep in mind that the tutorial has once been set up for TYPO3 v6. It follows some deprecated conventions. If so, this will be mentioned in the tutorial.