我正在使用magento 1.9.0.1
.我从链接安装了主题pagayo-theme-003
此主题已包含滑块。但是滑块没有显示。滑块代码在magentoappdesignfrontenddefaultpagayo-theme-003templatepagayhome.phtml
home.phtml
中可用。
我不知道为什么不显示滑块。
当我用1column.phtml
编写此滑块代码时,将显示滑块。但这会导致所有页面。我只需要home page
滑块.
当我直接用CMS->Pages->Home Page-> Contents
编写滑块代码时,没有给出任何结果。
那么如何在主页中显示滑块。请帮助我..谢谢。。。
您必须使用标识符"home"编辑CMS页面,并添加以下内容:
{{block type='core/template' template='pagayo/home.phtml'}}
模板(phtml文件)将包含在您的主页中,滑块也将在那里;)
希望这有帮助。
编辑:
来自帕加约网站 :
步骤 4:配置主页
转到 CMS>主页>主页(选择主页作为 URL 键)
在"内容>内容"框下:隐藏编辑器并添加以下代码:
{{block type='core/template' template='pagayo/home.phtml'}}
在"设计>页面布局"下:从"布局"下拉列表中选择 1 列
在"设计>页面布局"下:添加此代码"布局更新 XML":
5
这里的***将是您想要在主页上显示的任何类别。 例如:
10
单击保存页面。
按照以下步骤配置主页。
- 转到 CMS ->主页>页面(如果主页不存在,请创建一个)
- 单击页面信息选项卡,然后将页面标题"主页"和页面网址"主页"
-
现在单击内容选项卡,然后单击显示/隐藏编辑器并输入以下代码:
{{block type='core/template' template='pagayo/home.phtml'}}
4.1 现在单击"设计"选项卡,然后从"布局"下拉列表中选择布局为1列
4.2 布局更新 XML 添加以下代码:
<reference name="content">
<block type="catalog/product_list" name="featured" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>your_cat_id</category_id></action>
<action method="setColumnCount"><count>5</count></action>
</block>
</reference>
其中your_cat_id是您要在主页上展示商品的类别的 ID,例如:
<action method="setCategoryId"><category_id>5</category_id></action>
其中 5 是您的类别代码
单击保存页面并清除缓存。