Introduction
In this video series we show how you can integrate your own template as an extension in TYPO3. A special form of extension is used here - the distribution.
Fluidtemplate is used to integrate the HTML template into TYPO3.
Note: the methods shown in these videos are just one of many ways of integrating templates into TYPO3. In TYPO3 there are often many ways to achieve a goal, and one way is not necessarily better than another.
Part 21: Defining backend layouts via page TSconfig
Please note:
Something has changed in TYPO3 since these videos were created. If backend layouts are outsourced to PageTSconfig, the ID of the backend layout must be preceded by pagets__ in the TypoScript.
The following is a code example that works from TYPO3 7.6.
Please do not simply use this code 1:1 for the demo distribution, it is an example that would of course have to be adapted!
page.10 = FLUIDTEMPLATE
page.10 {
partialRootPath = EXT:mydemodistribution/Resources/Private/Partials/
layoutRootPath = EXT:mydemodistribution/Resources/Private/Layouts/
## Evaluate backend layouts
file.stdWrap.cObject = CASE
file.stdWrap.cObject {
key.data = pagelayout
# default = 2Columns
default = TEXT
default.value = EXT:mydemodistribution/Resources/Private/Templates/2Columns.html
## If BE layouts are stored in the DB, they can only be accessed via the ID, i.e. 1 = TEXT...
## If BE layouts are stored in PageTS, access via pagets__ID, e.g. pagets__1 = TEXT...
# Homepage
pagets__1 = TEXT
pagets__1.value = EXT:mydemodistribution/Resources/Private/Templates/Homepage.html
# 2Columns
pagets__2 < .default
# 1Columns
pagets__3 = TEXT
pagets__3.value = EXT:mydemodistribution/Resources/Private/Templates/1Column.html
}
## Pass content to the templates
variables {
left < styles.content.get
left.select.where = colPos = 1
main < styles.content.get
main.select.where = colPos = 0
right < styles.content.get
right.select.where = colPos = 2
}
}