Multi-column list of the categories in a section

Your code modifications and patches you want to share with others.
Locked
Schobluto
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Jul 23, 2009 9:50 pm

Multi-column list of the categories in a section

Post by Schobluto » Fri Jul 24, 2009 8:25 pm

An old message of 2005 in this forum (http://forum.joomla.org/viewtopic.php?f ... w=previous) gave some tips and files to have a multi-column list of the categories in a section.

However this was for Joomla v1.0.2, seems not updated and the files to download here are inexistent in my Joomla 1.5

Does an update exist somewhere ? Or can someone tell me what I can do to have a multi-column list of the categories in a section? Is there an extension to do this or better a patch ?

Thanks a lot.

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11399
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Multi-column list of the categories in a section

Post by ooffick » Sun Jul 26, 2009 9:11 pm

Hi,

you can change the design of that page (including the multi column design) with the help of the template overwrite.
  1. create a folder in your template folder called "html" (if it doesn't exists)
  2. create a folder in that html folder called "com_content" (if it doesn't exists)
  3. create a folder in that com_content folder called "section" (if it doesn't exists)
  4. copy the file .../components/com_content/views/section/tmpl/default_item.php in this .../templates/[your-template]/html/com_content/section/ folder
  5. change that file so it fits your requirements
Olaf
Olaf Offick - Global Moderator
learnskills.org

Garamond
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Oct 22, 2006 9:48 pm

Re: Multi-column list of the categories in a section

Post by Garamond » Tue Dec 15, 2009 12:20 am

Reviving this old thread, since I didn't got this trick to work. First of all, there was no file called "default_item.php", but "default.php". I guess this is the same file ooffick meant.

Anyway, I don't have the sufficient php knowledge to edit that file in a way that I can see my categories list as multi-column. Can anyone help me out here?

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11399
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Multi-column list of the categories in a section

Post by ooffick » Tue Dec 15, 2009 9:50 am

Which Joomla version do you have?

Olaf
Olaf Offick - Global Moderator
learnskills.org

Garamond
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Oct 22, 2006 9:48 pm

Re: Multi-column list of the categories in a section

Post by Garamond » Tue Dec 15, 2009 11:29 am

1.5.15

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11399
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Multi-column list of the categories in a section

Post by ooffick » Tue Dec 15, 2009 11:46 am

yes, you can use the default.php file in the same directory.
How many columns would you like to have?

Olaf
Olaf Offick - Global Moderator
learnskills.org

Garamond
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Oct 22, 2006 9:48 pm

Re: Multi-column list of the categories in a section

Post by Garamond » Tue Dec 15, 2009 11:52 am

Three columns would be sufficient in this case.

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11399
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Multi-column list of the categories in a section

Post by ooffick » Tue Dec 15, 2009 12:00 pm

Ok, try something like this:
  1. create a folder in your template folder called "html" (if it doesn't exists)
  2. create a folder in that html folder called "com_content" (if it doesn't exists)
  3. create a folder in that com_content folder called "section" (if it doesn't exists)
  4. copy the file .../components/com_content/views/section/tmpl/default.php in this .../templates/[your-template]/html/com_content/section/ folder
  5. open that file
  6. find the following lines:

    Code: Select all

    	<ul>
  7. replace it with the following lines:

    Code: Select all

    	<ul class="sectionlist">
  8. save the file
  9. add these css rules to the end of your css file:

    Code: Select all

    ul.sectionlist li {
    width:30%;
    float:left;
    height:60px;
    }
    ul.sectionlist {
    list-style:none;
    width:100%;
    }
    
Olaf
Olaf Offick - Global Moderator
learnskills.org

Garamond
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Oct 22, 2006 9:48 pm

Re: Multi-column list of the categories in a section

Post by Garamond » Tue Dec 15, 2009 8:01 pm

I'm sorry to say the trick didn't work for me. Additional info that might be of importance: I'm using the Affinity theme from RocketTheme, style 2.

When you say css-file, do you mean the "template.css" or the "style2.css"?
I tried both but no results.

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11399
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Multi-column list of the categories in a section

Post by ooffick » Tue Dec 15, 2009 8:05 pm

You might need to clear the Joomla cache and clear your Broswer's cache as well. Do you have a URL?

Olaf
Olaf Offick - Global Moderator
learnskills.org

Garamond
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Sun Oct 22, 2006 9:48 pm

Re: Multi-column list of the categories in a section

Post by Garamond » Tue Dec 15, 2009 9:01 pm

Cleared both caches but still no difference. It's on a "restricted access" site, with a memberlist which I'm not autorized to publish. Sorry.

I see there are several css files in the css folder, did you mean the "template.css"?

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11399
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: Multi-column list of the categories in a section

Post by ooffick » Tue Dec 15, 2009 10:11 pm

It doesn't really matter in which css file you add it. But yes, that css file would work.

Please use firebug to identify the exact CSS rule. To learn how to use Firebug, please click here:

http://docs.joomla.org/Tutorial:Using_F ... la_Website

Olaf
Olaf Offick - Global Moderator
learnskills.org


Locked

Return to “Core Hacks and Patches”