Howto override bootstrap contentelements templates
Sometimes can occur that you are building a custom extension that overrides the default contentelement templates of bootstrap package.
If you install textimage_size and want run it with your extension, you will notice that each extensions are mutually exclusive. because both are overriding the default templates/partial paths. Usually this happens via constants.
Best way to solve this problem is to change a library of bootstrap package, You can put this code within you setup file or Template > edit whole template > edit setup. This is the code:
# CONTENT ELEMENT SETTINGS
# Shared settings for TYPO3 content elements
lib.contentElement = FLUIDTEMPLATE
lib.contentElement {
templateName = Default
templateRootPaths >
templateRootPaths {
0 = EXT:bootstrap_package/Resources/Private/Templates/ContentElements/
10 = {$plugin.bootstrap_package_contentelements.view.templateRootPath}
20 = EXT:textimage_size/Resources/Private/Templates/ContentElements/
30 = EXT:yourextension/Resources/Private/Templates/ContentElements/
}
partialRootPaths >
partialRootPaths {
0 = EXT:bootstrap_package/Resources/Private/Partials/ContentElements/
10 = {$plugin.bootstrap_package_contentelements.view.partialRootPath}
20 = EXT:textimage_size/Resources/Private/Partials/ContentElements/
30 = EXT:yourextension/Resources/Private/Partials/ContentElements/
}
}
as you can see above, the code will delete the default library (partially) with:
...
templateRootPaths >
...
partialRootPaths >
...
to avoid this and if you prefer, you do the same with few lines to integrate the existing code:
lib.contentElement.templateRootPaths.20 = EXT:textimage_size/Resources/Private/Templates/ContentElements/
lib.contentElement.templateRootPaths.30 = EXT:yourextension/Resources/Private/Templates/ContentElements/
lib.contentElement.partialRootPaths.20 = EXT:textimage_size/Resources/Private/Partials/ContentElements/
lib.contentElement.partialRootPaths.30 = EXT:yourextension/Resources/Private/Partials/ContentElements/