Zend certified PHP/Magento developer

Magento 1.9 – Customizing Left Nav so it displays different items from Top (horizontal) Nav

Thanks for looking! I’ve been playing around with this for a while with no luck getting a working instance… although I have VERY limited experience with .php so this might be a simple answer!

THE PROBLEM: I would like to utilize Magento’s left nav to display items that are nested one level deeper than the root level. For example, my root level is ‘AV Production’, ‘Sales & Expendables’, ‘About Us’, ‘Contact Us’… these categories do not need to be displayed on the ‘AV Production’ page, I would just like to see the sub-categories of ‘AV Production’ displayed (‘Audio’, ‘Monitors’, ‘Video’, ‘Lighting’…). If that isn’t possible, I’d like to just suppress displaying ‘About Us’ and ‘Contact Us’ in the left nav.

WHAT I’VE TRIED: I tried changing the script we have (we use a plug for an AJAX left menu) to modify the starting point for where it looks for the categories [$rootcatId = $store->getRootCategoryId();] but couldn’t find anything that seemed to make a difference to the starting point. Ideally, I want to tell Magento to look one level down from the root and only display that in the nav…. I understand that might not be do-able though, especially since we have multiple store views.

Second thing I tried was suppressing the display of unwanted categories in the left nav, again, my .php skills are non existent and so it’s probably all kinds of wrong. Anyway, please see below for the original script (A) and my futile attempt at a modified script (B). Even small pointers to get me on the right track would be appreciated. Thanks!

ORIGINAL (A):

< ?php
ob_start();
$store = Mage::app()->getStore();
$block_title = $this->getBlockTitle();
if(Mage::getStoreConfig('categorylist_section/general/enable',$store)) {
    if ( empty($block_title) ) $block_title = 'Categories';
    ?>
< ?php echo $this->__($block_title) ?>
< ?php $rootcatId = $store->getRootCategoryId(); $categories = Mage::getModel('catalog/category')->getCategories($rootcatId); echo $this->getCategories($categories); ?>
< ?php } ?>

MODIFIED (B):

< ?php
ob_start();
$store = Mage::app()->getStore();
$block_title = $this->getBlockTitle();
if(Mage::getStoreConfig('categorylist_section/general/enable',$store)) {
    if ( empty($block_title) ) $block_title = 'Categories';
    ?>
< ?php echo $this->__($block_title) ?>
< ?php $rootcatId = $store->getRootCategoryId(); $categories = Mage::getModel('catalog/category')->getCategories($rootcatId);?> < ?php foreach ($this->getCategories() as $categories): ?> < ?php if (!in_array($categories->getId(), array(91,92,98))) : ?> < ?php echo $this->drawItem2($categories) ?> < ?php endif; ?> < ?php endforeach ?>
< ?php } ?>