0
votes

I'm having problem in adding category description to top navigation. I'm using custom extension magento extension (got it from http://web-experiment.info/webandpeople-custom-menu-extension.html)

So far i went to navigation.php file and changed

$html.= '<a class="itemMenuName level' . $level . $active . '" href="' . $this->getCategoryUrl($child) . '"><span>' . $name  . ' </span></a>' ;

To

$html.= '<a class="itemMenuName level' . $level . $active . '" href="' . $this->getCategoryUrl($child) . '"><span>' . $name . $description . ' </span></a>' ;

but still i'm getting only category name.

You can get the complete code in http://puck.ro/Navigation.txt

I thought this is not the right way of doing this!! Did anyone tell me the exact way of doing this?

Thanks in advance.

1

1 Answers

0
votes

I used this to grab the descriptions

$category_data =Mage::getModel('catalog/category')->load($id);
$category_data_des = $category_data->getDescription();

then just added in the loop like so

$html[] = '<span>'.$category_data_des.'</span>';