我只是尝试添加额外的模板文件,在右侧栏中包含一个内容块,但失败了。
下面是我的努力
在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的缓存。
发布于 2011-06-15 15:34:48
我自己发现我使用了错误的type="cms/template"类型。这应该是type="core/template"
<block type="core/template" template="callouts/right_template.phtml"/>https://stackoverflow.com/questions/6354227
复制相似问题