我试图从自定义主题中的自定义插件中包含模板Shopware 5.2。如何在自定义Shopware主题中包含自定义插件中的模板?
的主题模板包含以下行:
{include file="frontend/custom/colorpicker.tpl"}
插件模板位于/custom/plugins/PLUGINNAME/Resources/views/frontend/custom/colorpicker.tpl
我收到以下错误信息:
Fatal error: Uncaught SmartyException: Unable to load template snippet 'frontend/custom/colorpicker.tpl' in 'frontend/detail/index.tpl|frontend/plugins/seo/index.tpl' in...
我已经尝试添加父到文件路径,但没有喜悦。该错误消息消失,但没有装载模板:
{include file="parent:frontend/custom/colorpicker.tpl"}
可惜我找不到Shopware文档中的任何东西,说明是否有什么特别的东西,包括从一个插件模板需要。
这似乎是正确的做法,非常感谢你!不幸的是,我现在没有时间设置它并尝试一下。但是一旦我确认了,我会接受你的回答。 – pwagner