我只是尝试添加额外的模板文件以在右侧栏中包含内容块,但失败了。
下面是我的努力
添加到 local.xml 文件中
<reference name="right">
<block type="cms/template" name="right.side.template">
<action method="setTemplate">
<template>callouts/right_template.phtml</template>
</action>
</block>
</reference>
我也尝试过这个
<block type="cms/template" template="callouts/right_template.phtml"/>
并创建了一个模板文件 callouts/right_template.phtml。
但它没有加载右侧栏中的模板文件内容。
我该怎么办?我已经清除了magento缓存。
我自己发现我使用了错误的类型type="cms/template"
。这应该是type="core/template"
<block type="core/template" template="callouts/right_template.phtml"/>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)