Add Magento Category Links to your Footer Template

New Wave New Thinking

A useful bit of code for those who want to start optimising their website towards visitors and importantly Google for great SEO.

In your footer template file add the following code snippet where you want to display a list of your Magento categories.



<?php $helper = $this->helper(‘catalog/category’) ?>

<?php foreach ($helper->getStoreCategories() as $_category): ?>

<li><a href=”<?php echo Mage::getModel(‘catalog/category’)->setData($_category->getData())->getUrl(); ?>” title=”<?php echo $_category->getName() ?>”><?php echo $_category->getName() ?></a></li>

<?php endforeach ?>


View original post


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s