简体   繁体   English

Magento-left.ptml不在所有产品列表页面上显示

[英]Magento - left.ptml not showing on all product list pages

left.phtml在magento页面上显示左侧导航的文件仅显示在一个列表视图页面上,而其他任何人都没有解决方案来使该文件显示在所有列表视图中

If you are tasking left.phtml, 如果您要分配left.phtml,

Then According magento structure left.phtml are only show for Non-Anchor category in it left side of category . 然后,根据magento structure left.phtml仅在Non-Anchor categoryleft side of category显示Non-Anchor category left side of category

And layer navigation are only showing for Anchor category .for anchor left.phtml is not showing. 并且仅针对Anchor category显示layer navigation对于锚left.phtml不显示。

 For non-Anchor categories

see catalog.xml code 请参阅catalog.xml代码

<catalog_category_default translate="label">
        <label>Catalog Category (Non-Anchor)</label>
        <reference name="left">
            <block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
        </reference>

Also for 也用于

Anchor categories

see at catalog.xml 参见catalog.xml

 <catalog_category_layered translate="label">
        <label>Catalog Category (Anchor)</label>
        <reference name="left">
            <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
        </reference>

Hope ,you will understand . 希望,你会understand

  1. Check the layout in folder theme/package (it can be in default/default, when your theme is in another folder) 检查文件夹主题/包中的布局(当您的主题位于另一个文件夹中时,可以使用默认/默认布局)
  2. Check if layout is plugged (use in your layout.xml something like <remove name="header">). 检查是否插入了布局(在您的layout.xml中使用<remove name =“ header”>之类的东西)。 If header will be removed - you use correct layout 如果标题将被删除-您使用正确的布局
  3. Check the handle and reference name, where you are adding block. 检查要在其中添加块的句柄和引用名称。 For example: you are adding layered navigation block. 例如:您要添加分层导航块。 On one page it placed in handle <catalog_category_layered>, but your page there no this handle. 在一页上,它放在句柄<catalog_category_layered>中,但是您的页面上没有此句柄。 Try to add to <catalog_category_default> or even in <default>. 尝试添加到<catalog_category_default>甚至是<default>中。
  4. Open your template and check if the block was added there. 打开您的模板,然后检查是否在其中添加了该块。 Look for <?php $this->getChildHtml('blockName'); 寻找<?php $ this-> getChildHtml('blockName'); ?> ?>
  5. Try to change your block name (maybe on this page already exist block with the same name) 尝试更改您的块名称(也许此页面上已经存在相同名称的块)
  6. (this option can be useless for you) Please check the block output in system / configuration / advanced (此选项可能对您无用)请检查系统/配置/高级中的块输出
  7. Maybe there is a conflict between two navigation modules (for example module A and module B). 两个导航模块(例如,模块A和模块B)之间可能存在冲突。 The module A can use it for rewrite. 模块A可以使用它进行重写。 But the module B will use it only for investigation and use on this page it's own calls. 但是模块B仅将其用于调查,并在此页面上使用它自己的调用。 In that case the module A will not work (to resolve this issue you need to change rewrite. class A should rewrite class B) 在这种情况下,模块A将无法工作(要解决此问题,您需要更改重写。类A应该重写类B)

If you are trying to add navigation to CMS page - try to google this topic (how to add navigation to CMS page). 如果您尝试将导航添加到CMS页面,请尝试使用Google主题(如何将导航添加到CMS页面)。 There are many examples and I don't want to duplicate them. 有很多示例,我不想重复它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM