'Joomla 3 category blog article override
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.
Solution 1:[1]
you should override this file:
components/com_content/views/category/tmpl/blog_item.php
Read More:
Solution 2:[2]
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
Solution 3:[3]
Try to override the following tmpl files :"category/blog_item.php", "category/default_articles.php" and "article/default.php"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Saeed sdns |
Solution 2 | Brian Bolli |
Solution 3 | moDevsome |