gpt4 book ai didi

magento - 将 Magento 新主题中的 local.xml 中的主页更改为 1column.phtml

转载 作者:行者123 更新时间:2023-12-02 21:58:34 28 4
gpt4 key购买 nike

我是 Magento 新手。我想在其中发展主题。我开始通过创建 CSS、JavaScript 并将这些文件添加到其中来创建它,它就可以工作了。我想将主页的模板文件更改为位于

的 1column.phtml
my_theme/default/template/page/1column.phtml

这是我在 local.xml 文件中的代码

<?xml version="1.0" encoding="UTF-8"?>
<layout>
<!--default layout-->
<default>

<reference name="head">
<action method="addItem"><type>skin_css</type><name>css/style.css</name></action>
</reference>

</default>

<cms_index_index>

<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>

<reference name="head">
<action method="addItem"><type>skin_js</type><name>js/script.js</name></action>
</reference>

</cms_index_index>

</layout>

但是结果是默认使用3column.phtml。

如何将 1column.phtml 设置为我的 Magento 主页?

最佳答案

您可以简单地完成此操作,而无需更改任何核心文件:

  1. 登录管理面板
  2. 导航至 CMS->页面
  3. 转到名为“主页”的页面,然后单击它。
  4. 在左侧面板上转到“设计”选项卡
  5. 在页面布局列下,选择 1 列
  6. 保存

请查看以下图片以获取更多信息:

enter image description here

关于magento - 将 Magento 新主题中的 local.xml 中的主页更改为 1column.phtml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17334239/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com