Hi
Hope someone can help me with this. I need to show 3 specific categories on my Magento home page. I have created a "list-homepage.phtml" file and have the following code in this file.
Code:
<div class="row">
<?php foreach ($this->getStoreCategories() as $_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 class="catalog-image">
<div class="col-sm-4">
<a href="<?php echo $this->getCategoryUrl($_category)?>">
<img src="<?php echo $immagine ?>" alt="<?php echo $this->htmlEscape($this->getCurrentCategory()->getName()) ?>" class="img-responsive" />
</a>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
And I have added this block to my home page in the back-end.
Code:
{{block type="catalog/navigation" name="catalog.category" template="catalog/category/list-homepage.phtml"}}
The problem with this is that it displays all the categories I have, I just want to display 3, what do I have to do in order to achieve this?
Many Thanks for your help
View more threads in the same category:
Bookmarks