Display categories on Magento -


i create 1 root categori , 2 sub-categories

http://i.imgur.com/aek3mo9.jpg

and create new static block

http://i.imgur.com/tnm5ucc.jpg

the next make file categories.phtml in

app/design/frontend/default/my_template/template/catalog/navigation 

categories.phtml

    <?php foreach ($this->getstorecategories() $_category): ?> <?php $open = $this->iscategoryactive($_category); ?> <?php $cur_category=mage::getmodel('catalog/category')->load($_category->getid()); $layer = mage::getsingleton('catalog/layer'); $layer->setcurrentcategory($cur_category); if ($immagine = $this->getcurrentcategory()->getimageurl()): ?> <div style="float: left; padding-right: 30px; text-align: center;"> <div class="linkimage"> <p> <a href="<?php echo $this->getcategoryurl($_category)?>"> <img src="<?php echo $immagine ?>" alt="<?php echo $this->htmlescape($this->getcurrentcategory()->getname()) ?>" width="135" height="135" /> <?php echo $_category->getname()?> </a> </p> </div> </div>  <?php endif; ?> <?php endforeach; ?> 

not working!

there might issue configuration , may in list page

here documentation graphical understanding list number of categories in cms block

just go throw this article , can solve problem easily

hope sure.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -