Gossamer Forum
Home : Products : Links 2.0 : Customization :

4 column sub category

Quote Reply
4 column sub category
Ok I need to modify yet againFrown

I want to put the sub categories into its own table ( which is done already ) but I want the subcategories to be in 4 columns not two.

I read the code but can't come up with an easy solution.


Another one for you Perl FlunkyCool
Quote Reply
Re: [bytor] 4 column sub category In reply to
Actually, the solution is pretty simple... Look over these posts:

http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=222526#222526


http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=101198#101198


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] 4 column sub category In reply to
Neither of those work.

It changes the home page categories. I need to change just the sub categories on the categories pages.

I want my home page to be the way it is with two columns. When you click on a category and go to that page their are sub categories listed their and they are in two columns. Those are the ones I want in 4 columns.

I have played with those other suggestions and can't get them to work the way I want them.Unsure
Quote Reply
Re: [bytor] 4 column sub category In reply to
Okay I used this mod http://www.gossamer-threads.com/...i?post=101198#101198

but if their is a remainder of 1 when it divides by three (yes I went with 3 columns not 4 ) it puts that remainder into a new column which then gives me four.

Any help with the coding to deal with a remainder of 1 would be great!

Last edited by:

bytor: Sep 1, 2006, 7:42 PM
Quote Reply
Re: [bytor] 4 column sub category In reply to
Not sure, maybe try $i = -1;, but that probably won't work...

Attached is a copy of a post to have the subcats build differently than the main page.

(I was rather annoyed when I finally found that post, thus the title.)


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Sep 1, 2006, 8:51 PM
Quote Reply
Re: [PerlFlunkie] 4 column sub category In reply to
Okay I kinda fixed it my self.

my ($half) = int (($#subcat+2) / 3);

I changed to

my ($half) = int (($#subcat+3) / 3);

Now if there is a remainder of one I still get 3 columns but the third column is not equal.

Still looks okay. A whole lot better than a fourth row!
Quote Reply
Re: [bytor] 4 column sub category In reply to
Thanks for posting your fix! Wink


Leonard
aka PerlFlunkie