Display category name in template

user1154641 picture user1154641 · Jan 19, 2012 · Viewed 14.1k times · Source

I am trying to display a category name in a module position.

I tried:

<?php echo $listing['Category']['title'];?>

It did not work.

I followed this link, but it shows the article title and I need the category one. I'm working on Joomla 1.7.

Answer

Semmerket picture Semmerket · Jun 15, 2014

Much more simple answer:

<?php echo $this->escape($this->item->category_title);?>