2
votes

Im trying to override the article layout for articles showing in the category blog layout. I have overriden the blog.php file from the folder components/com_content/views/category/tmpl into mytemplate/html/com_content/category, but this only overrides the category blog layout, not the layout of the actual articles.

The bit i need to override is the bit that loads inside here,

<article class="leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
  <?php
    $this->item = & $item;
    echo $this->loadTemplate('item');
  ?>
</article>

Any ideas how to do this without overriding every article on the site.

Thanks.

3

3 Answers

2
votes

you should override this file:

components/com_content/views/category/tmpl/blog_item.php

Read More:

Customize Your Joomla Templates by Learning Overrides

1
votes

You need to create another template over for the single article view. Place files to override from here:

components/com_content/views/articles/tmpl/

In here:

templates/myTemplate/html/com_content/article/

You can keep the names the same and every Article will use this template to render, or you can rename and manually assign the template to individual articles as needed.

Some links on the details on template overrides.

http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core http://docs.joomla.org/Understanding_Output_Overrides http://docs.joomla.org/Layout_Overrides_in_Joomla

0
votes

Try to override the following tmpl files :"category/blog_item.php", "category/default_articles.php" and "article/default.php"