0

フッターに表示されるサブカテゴリのリストがあります。現在、リストは 2 列ですが、3 列にしたいと考えています。

これが私が現在取り組んでいるコードです。

<li class='shop_online'>        
    <?php
            #########################################
            $temparray = array();
            $_helper = Mage::helper('catalog/category');
            $_categories = $_helper->getStoreCategories();
            $currentCategory = Mage::registry('current_category');
            if (count($_categories) > 0): 
                foreach($_categories as $_category):

                        $temparray[] = "<a href='".$_helper->getCategoryUrl($_category)."'>".$_category->getName()."</a>";
                    /*
                        $_category = Mage::getModel('catalog/category')->load($_category->getId());
                        $_subcategories = $_category->getChildrenCategories();
                    if (count($_subcategories) > 0):

                        foreach($_subcategories as $_subcategory):
                                $temparray[] = "<a href='".$_helper->getCategoryUrl($_subcategory)."'>".$_subcategory->getName()."</a>";

                                $_subsubcategory = Mage::getModel('catalog/category')->load($_subcategory->getId());
                                $_subsubcategories = $_subsubcategory->getChildrenCategories();
                                if (count($_subsubcategories) > 0):

                                    foreach($_subsubcategories as $_subsubcategory):        
                                        $temparray[] = "<a href='".$_helper->getCategoryUrl($_subsubcategory)."'>".$_subsubcategory->getName()."</a>";                                        
                                    endforeach;                                  
                                endif;                               
                        endforeach;                          
                    endif; 
                  */
                endforeach;

            endif;

    echo "<ul class='footer_links_list'>";
            if(count($temparray) > 0)
            {
                echo '<h3><a href="'.Mage::getBaseUrl().'shop-online'.'">SHOP ONLINE</a></h3>';
                for( $i=0; $i<count($temparray); $i++ )
                {
                    if(($i+1)%1==0 || ($i+1)%1==0)
                    echo "<li>".$temparray[$i]."</li>";
                }
            }
    echo "</ul>";
            #########################################
            ?>
  </li>

これを 3 列目に分割してフッターに表示する方法がわかりません。

formagdev1.com は、私が取り組んでいる開発サイトです。

何か案は?

ありがとう、ビル

4

1 に答える 1

1

1808 行目の styles.css で、以下のクラスの幅を 33% (元の 50%) に変更するだけで問題ありません。

ul.footer_links_list li

乾杯!

于 2012-07-30T20:59:54.857 に答える