Manage hierarchy / enforce priority of TS-templates

拈花ヽ惹草 提交于 2019-12-08 09:48:19

问题


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:

  1. SYS: TYPO3_CONF_VARS:FE:defaultTypoScript
  2. EXT:fluid_styled_content/Configuration/TypoScript/...

... a bunch of other third party extensions ...

  1. EXT:indexed_search/Configuration/TypoScript
  2. EXT:templates_ext/Resources/Private/TypoScript
  3. extbase
  4. fluid
  5. extensionmanager
  6. belog
  7. beuser
  8. felogin
  9. indexed_search
  10. sys_note
  11. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!