2015-05-29 98 views
0

我正在運行帶有RWD主題的Magento 1.9.1.0。當將頁面佈局設置爲2 columns with left bar時,我可以正確地看到左側欄中的過濾器(按價格等進行排序)。我如何才能在1 column頁面佈局中工作(僅適用於類別)?我想在我的產品頂部使用像Catalin SEO目錄分層導航(幻燈片價格欄等)的東西來創建此全角版本。將過濾分層導航添加到1列分類Magento中的頁面

回答

1

1column.phtml模板沒有左側的塊,這是通常注入層視圖塊的位置。在local.xml中做到這一點的方法之一是把在內容的塊(或after_body_start或before_body_end,或任何核心/ text_list子塊):

<catalog_category_default> 
    <reference name="root"> 
     <action method="setTemplate"><template>page/1column.phtml</template></action> 
    </reference> 
    <reference name="content"> 
     <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"> 
      <block type="core/text_list" name="catalog.leftnav.state.renderers" as="state_renderers" /> 
     </block> 
    </reference> 
</catalog_category_default> 

在你的CSS,你可以隱藏層塊HTML如果你不想顯示,但仍然希望它加載:

.category-mycategory .block-layered-nav { 
    display: none; 
} 

mycategory是你的類別名稱。

相關問題