问题
Well, there is actually another guy with exact the same problem. But until today, they didn't come up with a solution, that's why I'm asking it once again.
My entire TS is included by an extension in TYPO3 7.6.8
. This works fine except with indexed_search
. The TS inside my resources EXT get overwritten by the indexed_search default TS.
This is the order of the TS inside the Template-Analyzer:
- SYS: TYPO3_CONF_VARS:FE:defaultTypoScript
- EXT:fluid_styled_content/Configuration/TypoScript/...
... a bunch of other third party extensions ...
- EXT:indexed_search/Configuration/TypoScript
- EXT:templates_ext/Resources/Private/TypoScript
- extbase
- fluid
- extensionmanager
- belog
- beuser
- felogin
- indexed_search
- sys_note
- realurl
So #7 is the extension which includes all my TS but it gets overwritten by #14. The only way to configure the indexed_search
is inside the setup of the page template (which comes after all those above). But I want to avoid that to keep things clean.
Is there a way to prioritize a certain TS so that it doesn't get overwritten?
回答1:
Open the TypoScript record, switch to the tab "Includes", at the bottom you will find the field Static Template Files from TYPO3 Extensions:. Select the value Include before all static templates if root flag is set
.
回答2:
Try putting the TS from your template extension inside the root page Setup field like this (adjust the path if necessary, your example says Resources/Private/TypoScript?):
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templates_ext/Configuration/TypoScript/setup.ts">
This should make sure that it is included AFTER all the other includes (I assume you included those via the includes tab?)
来源:https://stackoverflow.com/questions/37612743/manage-hierarchy-enforce-priority-of-ts-templates