Search code examples
phpjoomlajoomla3.3

Joomla Custom Category Blog


I'm working in my own template using Joomla 3.3 and I've created a custom category blog in my template

mytemplate\html\com_content\category

enter image description here now I need to make another custom category template, like news.php or products.php.

enter image description here

what I need is to have multiple custom category blog in my template. and I can select from menu manger the type of category blog template.

enter image description here

How to accomplish this??


Solution

  • I've solved this issue by a workaround.

    In mytemplate\html\com_content\category/blog.php

    I've added some conditional statements like;

    if($this->pageclass_sufx=='x')
    

    echo $this->loadTemplate('item');//which is acts as blog_item.php elseif($this->pageclass_sufx=='y') echo $this->loadTemplate('custom');//which is acts as blog_custom.php that I'vecreated

    And in menu manager for the category item I add page class suffex 'x' or 'y'