2

What I'm trying to do is create a category blog layout that will display the title of a category, followed by subcategories with the articles of those subcategories (full article, not just it's title) displayed directly after, like so:

TOP LEVEL CATEGORY

  • Subcategory 1
    • Subcategory 1 Article 1
    • Subcategory 1 Article 2
    • Subcategory 1 Article 3
  • Subcategory 2
    • Subcategory 2 Article 1
    • Subcategory 2 Article 2
    • Subcategory 2 Article 3

I don't think this should be too difficult to do, but I haven't been able to find a simple solution. I've tried to call the items template:

echo $this->loadTemplate('item');

within blog_children.php, but I get a fatal error: Fatal error: Call to a member function get() on a non-object. Has anyone accomplished this or have any advice?

1 Answer 1

-1

try , even if you haven't overriden it, to copy the default_item template into your template HTML folder.

To get to this result, you have to override the initial com_content templates of, let's say, blog. The overrides you do are to be put in your templates html folder (/templates/my_template/html/com_content/ to be specific). when you do so, it looks in that same folder for every subtemplate included. Like, for instance, blog_item, or default_item, or whatever according to the layout you are overriding. if it can't find it, you get a Fatal error, though I don't remember which one.

1
  • Thanks, I'm not seeing a default_item file, only default_articles and default_children in my components/com_content/views/category/tmpl. Is it hiding somewhere else?
    – Annemarie
    Commented Feb 2, 2015 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.