J1.5

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

From Joomla! Documentation

(New Tip)
 
Line 31: Line 31:
 
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:
 
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:
 
# Create the override directory for the Category Blog as follows: "<your joomla! home>/templates/<your template>/html/com_content/category".
 
# Create the override directory for the Category Blog as follows: "<your joomla! home>/templates/<your template>/html/com_content/category".
# Copy the [http://forum.joomla.org/viewtopic.php?f=428&t=304719#p1355352 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.
+
# Copy the [http://forum.joomla.org/viewtopic.php?f=428&t=304719#p1355323 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.
 
# Simlarly, for the Section Blog, create a directory called <your joomla home>/templates/<your template>/html/com_content/section".
 
# Simlarly, for the Section Blog, create a directory called <your joomla home>/templates/<your template>/html/com_content/section".
 
# Copy the [http://forum.joomla.org/viewtopic.php?f=428&t=304719#p1355352 attached file "blog.txt"] into this directory and rename it "blog.php". This file is modified to order articles like the Front Page blog.
 
# Copy the [http://forum.joomla.org/viewtopic.php?f=428&t=304719#p1355352 attached file "blog.txt"] into this directory and rename it "blog.php". This file is modified to order articles like the Front Page blog.

Revision as of 21:38, 27 July 2008

The "J1.5" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Problem[edit]

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.

Solution[edit]

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.