【问题标题】:Magento design update to replace list.phtml on search results page onlyMagento 设计更新仅在搜索结果页面上替换 list.phtml
【发布时间】:2013-02-15 17:40:43
【问题描述】:

如何向 Magento 发布设计更新以仅替换搜索结果页面的 list.phtml 模板?有不止一种方法可以做到吗?如果有一种方法可以像我对单个类别一样通过管理面板执行此操作,那将是理想的,但如果没有,那么编辑 xml 文件也可以。

【问题讨论】:

    标签: magento magento-1.7


    【解决方案1】:

    您应该创建文件:app/design/frontend/YOURPACKAGE/YOURTHEME/layout/local.xml,内容为:

    <?xml version="1.0" encoding="UTF-8"?>
    <layout version="0.1.0">
      <catalogsearch_result_index>
        <reference name="search_result_list">
            <action method="setTemplate"><template>custom/list.phtml</template></action>
        </reference>
      </catalogsearch_result_index>
    </layout>
    

    并创建您的自定义模板,例如 app/design/frontend/YOURPACKAGE/YOURTHEME/template/custom/list.phtml

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-01
      • 1970-01-01
      相关资源
      最近更新 更多