Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Add category listing to all sidebars and get parent category title? 
Jr. Member
Total Posts:  6
Joined:  2009-01-03

Hey all,

I’ve been searching forums but to no luck, so point me to the right direction if you know a solution. smile

How do I actually get the parent category to display in my <h4> tag?

The code in app\design\frontend\default\blank\template\catalog\navigation\left.phtml :

<?php $_categories=$this->getCurrentChildCategories() ?>
if($_categories->count()): ?>
<div class="category">
h4><?php echo $this->__('Category'?></h4>
<?php foreach ($_categories as $_category): ?>
if($_category->getIsActive()): ?>
a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>>
<?php echo $this->htmlEscape($_category->getName()) ?>
<?php echo $_category->getProductCount() ?>)
<?php endif; ?>
endforeach ?>
<?php endif; ?>

Next, with left.phtml, what do I add onto all the xml files to get it to display on ALL the sidebars of my site (page, shopping cart, checkout)? Currently it’s displaying fine in Category and Product pages.

Thanks in advance!

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top