搜索结果页面未使用自定义 list.phtml 模板 [magento]
custom list.phtml template is not used on search result page[magento]
Product/category 列表页面使用我的自定义模板。但是当我搜索产品时。结果显示在默认 list.phtml 模板中。
如何告诉 Magento 也将我的 [list.phtml] 模板用于结果页面。
转到主题布局文件夹中的catalogsearch.xml。(如果找不到xml,复制xml 文件从 base/default/layout 到您的 主题布局 文件夹)。然后
找到<catalogsearch_result_index translate="label">
在里面找到
<block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
将模板路径替换为 catalog/product/list.phtml
希望对您有所帮助
Product/category 列表页面使用我的自定义模板。但是当我搜索产品时。结果显示在默认 list.phtml 模板中。
如何告诉 Magento 也将我的 [list.phtml] 模板用于结果页面。
转到主题布局文件夹中的catalogsearch.xml。(如果找不到xml,复制xml 文件从 base/default/layout 到您的 主题布局 文件夹)。然后
找到<catalogsearch_result_index translate="label">
在里面找到
<block type="catalog/product_list" name="search_result_list" template="catalog/product/list.phtml">
将模板路径替换为 catalog/product/list.phtml
希望对您有所帮助