2010-01-08 21 views

回答

0

在catalog.xml布局文件中,您可以在产品列表块中添加一个'action'标签,该标签将设置列数......模板(list.phtml)将其称为get [Something] ,所以你希望布局文件中的method =“set [Something]”是相同的。方法被调用的类在app/code/core/Mage/Catalog/Block/Product/List.php ...我想。 catalog.xml在其中有一些注释掉的使用'action'进行分页的例子,所以你应该能够复制它们。有点模糊...但没有代码方便查看。

1

很难找到主题化的变化和local.xml中对Magento的1.4全面的指令,但有可能在网格视图的列中的错误的注意这里:

http://www.lotusseedsdesign.com/blog/change-grid-view-column-4-product-listing

我在此得到了由local.xml为一列页面/ 4列网格:

<?xml version="1.0" encoding="UTF-8"?> 
<layout> 
    <!-- Other template tweaks here --> 
<catalog_category_default> 
    <reference name="content"> 
     <reference name="category.products"> 
     <reference name="product_list"> 
       <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>4</count></action> 
       <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>4</count></action> 
     </reference> 
     </reference> 
    </reference> 
</catalog_category_default>