[TYPO3-english] Ext:news Templates fallback
Jigal van Hemert
jigal.van.hemert at typo3.org
Wed Nov 5 11:13:41 CET 2014
Hi,
On 05/11/2014 07:17, Fabien Berger wrote:
> I'm getting confused with this article about the templating section of
> news extension.
> It says this config is supposed to do the fallback but clearly it doesnt.
>
> plugin.tx_news {
> view {
> templateRootPaths {
> 0 = EXT:news/Resources/Private/Templates/
> 1 = EXT:themeadir/Resources/Private/Ext/News/Templates/
> }
> partialRootPaths {
> 0 = EXT:news/Resources/Private/Partials/
> 1 = EXT:themeadir/Resources/Private/Ext/News/Partials/
> }
> layoutRootPaths {
> 0 = EXT:news/Resources/Private/Layouts/
> 1 = EXT:themeadir/Resources/Private/Ext/News/Layouts/
> }
> }
> }
In TYPO3 6.2+ with this configuration the system looks in
EXT:themadir/Resources/Private/Ext/News/Templates/ first for a template
and if it was not found it looks in EXT:news/Resources/Private/Templates
If you don't have an extension "themadir" with templates in the
mentioned location it won't work of course. You can either adjust the
items starting with "1" with the location of your templates or add an
item "2".
> Also there is a notice "Nice to know: Since TYPO3 6.2 it is possible to
> just override a single template file. Multiple fallbacks can be defined
> which makes it far easier to customize the templates.", but no how to
> documentation seems available.
>
> I work on typo3 6.2.6
In previous releases you could only override the location and you had to
provide *all* templates in the new location. With the new functionality
you can add the new location and if only a single template needs to be
modified only that modified template can be put in the new location. The
other templates will be fetched from the old location.
--
Jigal van Hemert
TYPO3 CMS Active Contributor
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-english
mailing list