Actions

Difference between revisions of "Changing multi-column article order in section and category blogs"

From Joomla! Documentation

(Added to the parent Tips and tricks category)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Problem==
 
==Problem==
 +
''Note: The ability to order articles across columns was added as a new feature in version 1.5.7. So this Tip only applies versions 1.5.6 and earlier. Upgrading to 1.5.7 is strongly recommended for security reasons as well.''
 +
 
Section and Category Blog pages with 2 columns put articles in order ''down'' the column, as shown below:
 
Section and Category Blog pages with 2 columns put articles in order ''down'' the column, as shown below:
 
{| class="wikitable"
 
{| class="wikitable"
Line 27: Line 29:
  
 
Some Joomla! users prefer the way the Front Page works over the way the other blogs work and want to change the Section and Category Blogs to order articles like the Front Page.
 
Some Joomla! users prefer the way the Front Page works over the way the other blogs work and want to change the Section and Category Blogs to order articles like the Front Page.
 +
 +
== Headline text ==
  
 
==Solution==
 
==Solution==
Line 41: Line 45:
 
[[Category:Tips and tricks]]
 
[[Category:Tips and tricks]]
 
[[Category:Tips and tricks 1.5]]
 
[[Category:Tips and tricks 1.5]]
 +
[[Category:Tutorials]][[Category:Article Management]]

Latest revision as of 04:02, 20 September 2010

Problem

Note: The ability to order articles across columns was added as a new feature in version 1.5.7. So this Tip only applies versions 1.5.6 and earlier. Upgrading to 1.5.7 is strongly recommended for security reasons as well.

Section and Category Blog pages with 2 columns put articles in order down the column, as shown below:

article 1 1 (continued)
article 2 article 4
article 3 article 5

The Front Page Blog puts articles in order across columns, as shown below:

article 1 1 (continued)
article 2 article 3
article 4 article 5

Some Joomla! users prefer the way the Front Page works over the way the other blogs work and want to change the Section and Category Blogs to order articles like the Front Page.

Headline text

Solution

Using the Template Override feature of Joomla! 1.5, we can replace the code for the Section and Category blog ordering with the code from the Front page. Here are the steps:

  1. Create the override directory for the Category Blog as follows: "<your joomla! home>/templates/<your template>/html/com_content/category".
  2. Copy the attached file "blog.txt" to the new directory. Rename it to "blog.php". This file is modified to order articles like the Front Page blog.
  3. Simlarly, for the Section Blog, create a directory called <your joomla home>/templates/<your template>/html/com_content/section".
  4. Copy the attached file "blog.txt" into this directory and rename it "blog.php". This file is modified to order articles like the Front Page blog.

With these files installed and renamed, the Category and Section blogs should order articles across columns, just like the Front Page. If for any reason these files cause problems in your site, you can just delete them and the default files will be used instead. See the links above for details on the edits made for these files.

Note that this solution is for Joomla! version 1.5.x and may not work for 1.6 and later versions.