I would like to show the subcategory title in Joomla 3.3 category blog page. Got a following suggestion from a link and put it in the blog.php file like : /templates/mytemplate/html/com_content/category/blog.php
<?php
$this->item = &$item;
$subcat = $this->item->category_title;
if ($subcat != $psubcat) :
echo "<h2>" . $subcat . "</h2>";
endif;
$psubcat = $subcat;
?>
Normally this code is working except when we set the leading item 1. I have tried to set foreach condition before and after the code something like:
<?php foreach ($this->lead_items as &$item) : ?>
but its not working when we set lead items 1 or more on Category blog layout. So is there any way to show the subcategory title in Joomla Category blog layout or what kind of modification i need to put in the above code to make it work?