Kleines, sehr hilfreiches TypoScript für die wunderbare Extension „mask“ (Typo3).
Nicht selten kommt man an das Problem, mehr als nur einen Pfad zu seinen Mask-Templates definieren zu wollen. Die Extension-Konfiguration im Backend lässt leider nur jeweils einen einzigen Pfad für Folder for Content Fluid Templates (with trailing slash) frontend.content (folder), Folder for Content Fluid Layouts (with trailing slash) frontend.layouts (folder) und Folder for Content Fluid Partials (with trailing slash) frontend.partials (folder) zu.
Das Problem lässt sich aber im TypoScript-Setup lösen.
Ab Typo3 9 LTS
lib.maskContentElement {
templateRootPaths {
// 10 wird von mask gesetzt, abhängig von der EXT-Konfiguration im Backend
20 = EXT:deine/ext/Resources/Private/Templates/
}
partialRootPaths {
// 10 wird von mask gesetzt, abhängig von der EXT-Konfiguration im Backend
20 = EXT:deine/ext/Resources/Private/Partials/
}
layoutRootPaths {
// 10 wird von mask gesetzt, abhängig von der EXT-Konfiguration im Backend
20 = EXT:deine/ext/Resources/Private/Layouts/
}
}
Bis einschließlich Typo3 8 LTS
lib.tx_mask {
templateRootPaths {
// 10 wird von mask gesetzt, abhängig von der EXT-Konfiguration im Backend
20 = EXT:deine/ext/Resources/Private/Templates/
}
partialRootPaths {
// 10 wird von mask gesetzt, abhängig von der EXT-Konfiguration im Backend
20 = EXT:deine/ext/Resources/Private/Partials/
}
layoutRootPaths {
// 10 wird von mask gesetzt, abhängig von der EXT-Konfiguration im Backend
20 = EXT:deine/ext/Resources/Private/Layouts/
}
}
Wenn mir jetzt noch jemand sagen könnte, wie man die mask.json
in mehrere Dateien bekommt… dann würde ich den Entwicklern von mask eine Bierkasten-Abo schenken 🙂
Für Suchmaschinen: Typo3 Extension Mask. Mehrere Pfade zu Templates und templateRootPaths für mask typo3. mask typo3 multiple templateRootPaths. Zusätzliche Pfade für Mask-Templates per TypoScript angeben.
Danke für das Snippet!
Über den gleichen Weg kann man auch das Layout von fluid styled content einbinden: lib.maskContentElement.layoutRootPaths.0 < lib.contentElement.layoutRootPaths.0
Für Mask ist schon ein größerer release in Planung, aber das Aufteilen in mehrere mask.json Dateien ist da noch nicht mit drin. Steht aber auf der Liste 🙂