How to move the comments, ratings and sharing items above the article separator
This tutorial explains how to move the comments, ratings and/or bookmarks above the article separator. To achieve this we use Joomla's layout override system. You need to be able to create new files and edit them on your web hosting site using FTP or other tools that are available to you (contact your web host if you need more information).
All file paths are relative to the directory in which Joomla is installed. When looking a files you need to create, it is assumed that you will create the necessary folders if they don't already exist in each case. The directory default_template refers to the template that is set as the default for your site. Please replace this name with the actual name of the template directory.
Please note that in these examples, not only with the comments, ratings and/or bookmarks be moved, but also any other plugins that are using the same feature.
For more information on layout overrides, see http://www.theartofjoomla.com/topics/layout-overrides.html
In the Article View (Default Layout)
Find the file:
/components/com_content/views/article/tmpl/default.php
Copy this to:
/templates/default_template/html/com_content/article/default.php
Open the file for editing and find the following lines of code near the end of the file:
<span class="article_separator"> </span> <?php echo $this->article->event->afterDisplayContent; ?>
Reverse the order of these lines to look like this:
<?php echo $this->article->event->afterDisplayContent; ?> <span class="article_separator"> </span>
Save the file and refresh a page showing a single article.
In the Category View (Blog Layout)
Find the file:
/components/com_content/views/category/tmpl/blog_item.php
Copy this to:
/templates/default_template/html/com_content/category/blog_item.php
Open the file for editing and find the following lines of code near the end of the file:
<span class="article_separator"> </span> <?php echo $this->article->event->afterDisplayContent; ?>
Reverse the order of these lines to look like this:
<?php echo $this->article->event->afterDisplayContent; ?> <span class="article_separator"> </span>
Save the file and refresh a page showing articles in a category using the blog layout.
In the Frontpage View (Default Layout)
Find the file:
/components/com_content/views/frontpage/tmpl/default_item.php
Copy this to:
/templates/default_template/html/com_content/frontpage/default_item.php
Open the file for editing and find the following lines of code near the end of the file:
<span class="article_separator"> </span> <?php echo $this->article->event->afterDisplayContent; ?>
Reverse the order of these lines to look like this:
<?php echo $this->article->event->afterDisplayContent; ?> <span class="article_separator"> </span>
Save the file and refresh a page showing frontpage articles.
In the Section View (Blog Layout)
Find the file:
/components/com_content/views/section/tmpl/blog_item.php
Copy this to:
/templates/default_template/html/com_content/section/blog_item.php
Open the file for editing and find the following lines of code near the end of the file:
<span class="article_separator"> </span> <?php echo $this->article->event->afterDisplayContent; ?>
Reverse the order of these lines to look like this:
<?php echo $this->article->event->afterDisplayContent; ?> <span class="article_separator"> </span>
Save the file and refresh a page showing articles in a section using the blog layout.
No problem, support subscriptions give you access to one-on-one help from real Joomla experts.