在右侧边栏magento中添加其他模板 [英] adding additional template into right sidebar magento

查看:72
本文介绍了在右侧边栏magento中添加其他模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚尝试添加其他模板文件,以在右侧栏中包含一个内容块,但失败了.

I just tried to add addtional template file to include a block of content in right side bar but get failed.

以下是我的努力

添加到local.xml文件中

added in local.xml file

<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"/>

并创建了模板文件标注/right_template.phtml.

and created a template file callouts/right_template.phtml.

但是它不会在右侧栏中加载模板文件内容.

But it is not loading the template file content in right side bar.

我该怎么办?我已经清除了magento缓存.

How do I go about? I have cleared the magento cache.

推荐答案

我自己发现我使用了错误的类型type="cms/template".这应该是type="core/template"

I found it myself I was using wrong type type="cms/template". This should be type="core/template"

<block type="core/template" template="callouts/right_template.phtml"/>

这篇关于在右侧边栏magento中添加其他模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆