Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/254.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 删除Magento中“产品列表”页面的左侧列_Php_Xml_Magento - Fatal编程技术网

Php 删除Magento中“产品列表”页面的左侧列

Php 删除Magento中“产品列表”页面的左侧列,php,xml,magento,Php,Xml,Magento,如何在Magento中删除产品列表页面上的左侧列 我已经查看了local.xml文件,但我不确定应该编辑哪些代码。您可以在管理中更改产品列表的模板: -目录->管理类别->您的类别-选项卡自定义设计-字段-页面布局 或 在设计布局xml(local.xml或其他内容)中: 左边 或 左边 您还可以在xml中设置其他模板: <catalog_category_layered> <reference name="root"> <actio

如何在Magento中删除产品列表页面上的左侧列


我已经查看了local.xml文件,但我不确定应该编辑哪些代码。

您可以在管理中更改产品列表的模板: -目录->管理类别->您的类别-选项卡自定义设计-字段-页面布局

在设计布局xml(local.xml或其他内容)中:


左边


左边
您还可以在xml中设置其他模板:

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

第/1页column.phtml
有关模板,请参见template/page/。

使用local.xml(读取)


为什么需要删除“左列”为什么不将产品列表页面更改为其他布局。i、 e 2column-right.phtml、1column.phtml或3column.phtml在99%的情况下,无需实际删除左栏,只需更改布局即可

首先,您需要创建或更新local.xml文件,如果您没有可以在中创建的local.xml文件

应用程序->前端->[软件包名称]->[主题名称]->布局->local.xml

一旦创建了这个文件,你就可以准确地将我在这篇文章中的内容复制到该文件中,开始学习如何使用它

通过LOCAL.XML文件而不是catalog.XML执行所有更新!!这将使以后的升级更加容易。此外,您将能够在一个文件中快速查看对站点所做的所有更改

下面的示例将产品列表页面设置为1列

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <catalog_product_view translate="label">
        <reference name="root">
            <action method="setTemplate">

                <template>page/1column.phtml</template>
                <!-- Below are examples of different layouts you can use
                <template>page/2columns-right.phtml</template>
                <template>page/2columns-left.phtml</template>
                <template>page/3columns.phtml</template> -->
            </action>
        </reference>
    </catalog_product_view>
</layout>

第/1页column.phtml
希望这对新手有所帮助

<catalog_category_layered>
    <reference name="root">
        <action method="setTemplate"><name>page/1column.phtml</name></action>
    </reference>
</catalog_category_layered>
<catalog_category_default translate="label">
    <remove name="left"/>
</catalog_category_default>
<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <catalog_product_view translate="label">
        <reference name="root">
            <action method="setTemplate">

                <template>page/1column.phtml</template>
                <!-- Below are examples of different layouts you can use
                <template>page/2columns-right.phtml</template>
                <template>page/2columns-left.phtml</template>
                <template>page/3columns.phtml</template> -->
            </action>
        </reference>
    </catalog_product_view>
</layout>