design
部分design:article/full.tpl
已經應該做你想做的。它將搜索article/full.tpl
模板,從設計文件夾extension/myextension/design
中的templates
文件夾開始。
的eZ發佈將使用以下規則來找到好的模板:
第一:確定的,其設計是用於siteaccess。見[DesignSettings]
塊在site.ini文件小號
[DesignSettings]
SiteDesign=a_design_specific_or_not_to_your_siteaccess
AdditionalSiteDesignList[]=another_generic_design
AdditionalSiteDesignList[]=standard
AdditionalSiteDesignList[]=base
然後:確定的哪些擴展提供設計。查看每個擴展的design.ini文件[ExtensionSettings]
塊(extension/ezflow/settings/design.ini.append.php
的爲例):
[ExtensionSettings]
DesignExtensions[]=ezflow
最後,eZ Publish的外觀爲模板。 SiteDesign
設計將首先嚐試,然後全部從上到下設計AdditionalSiteDesignList
。找到模板後,查找停止,並且緩存此信息(即使您的TemplaceCache/TemplateCompile/...已禁用)。記住緩存部分,每次添加一個新模板,意圖覆蓋另一個模板時,都需要清除緩存。
因此,如果我們只有2個擴展提供設計,說ezflow
和mysite
,eZ Publish的將嘗試以下路徑:
extension/mysite/design/a_design_specific_or_not_to_your_siteaccess/templates/full/article.tpl
extension/mysite/design/another_generic_design/templates/full/article.tpl
extension/mysite/design/standard/templates/full/article.tpl
extension/mysite/design/base/templates/full/article.tpl
extension/ezflow/design/a_design_specific_or_not_to_your_siteaccess/templates/full/article.tpl
extension/ezflow/design/another_generic_design/templates/full/article.tpl
extension/ezflow/design/standard/templates/full/article.tpl
extension/ezflow/design/base/templates/full/article.tpl
design/a_design_specific_or_not_to_your_siteaccess/templates/full/article.tpl
design/another_generic_design/templates/full/article.tpl
design/standard/templates/full/article.tpl
design/base/templates/full/article.tpl
注意,我所做的mysite
延伸具有更高的優先級高於設定ezflow
。見settings/override/site.ini.append.php
:
[ExtensionSettings]
ActiveExtensions[]
ActiveExtensions[]=mysite
....
ActiveExtensions[]=ezflow
....
這是system
模板。當涉及到內容模板(由attribute_view_gui
和node_view_gui
函數使用的模板)時,該過程稍有不同,請參見https://doc.ez.no/eZ-Publish/Technical-manual/4.x/Templates/The-template-override-system