is there any way to style the output of <jdoc:include type="component" /> within the templates without modifying Joomla core function?
Specifically, I would like to add a div with id article to include the article and nothing else. By now, in my theme, there’s a div with class item-page that includes the article, the ratings, the action and even the comment box (added with an external plugin).
So, I would like the new templates to be something like:
<div class="item-page>
<!-- something here -->
<div id="article">
<!-- The article and nothing else here -->
</div>
<!-- comments and whatever may be here -->
</div>
Use a layout override.
Go to the
tmplfolder of the view you want to modify the layout for and copy to thehtmlfolder of your template … so say article:get
/components/views/article/default.phpand copy that totemplates/[yourtemplate]/html/com_content/article/default.phpModify the file as you wish.
This will default change it on all pages using that template.