Reputation: 11890
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>
Upvotes: 3
Views: 6118
Reputation: 6755
Use a layout override.
Go to the tmpl
folder of the view you want to modify the layout for and copy to the html
folder of your template ... so say article:
get /components/views/article/default.php
and copy that to
templates/[yourtemplate]/html/com_content/article/default.php
Modify the file as you wish.
This will default change it on all pages using that template.
Upvotes: 3