Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Displaying forums in four columns

Quote Reply
Displaying forums in four columns
I'm trying to modify the category_list template to show forums in four columns below their parent category (similar to the mailarc demo at http://www.gossamer-threads.com/lists/).
The basic logic is:
Code:
if it's category do a row spanning 4 columns
else it's a forum
if prev was cat then this is the first forum
start a new row and a new column
else it's another forum
if it's the 4th column
close the previous row and then start a new column
else
just start another column
end if
end if
end if
However, I can't figure out how to determine whether the current forum is the 4th, 8th, 16th etc, in the category (see the red code). I can't do a simple modulo on row_num because there's no way of knowing how many parent categories there were and the row_num will increment regardless of whether it's a category or forum.

Can you provide an example of how you set up the mailarc demo?

Many thanks
Quote Reply
Re: [paulj] Displaying forums in four columns In reply to
Hi,

You could do:

<%ifnot row_num % 4%>
it's a multiple of 4
<%endif%>

The mailing list archive home page is actually hand built so we can add/remove lists as we see fit. All the other pages are straight from Gossamer Forum though.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Displaying forums in four columns In reply to
Thanks for the reply Alex,

I actually tried that first. Unfortunately it will only work if all groups of forums have equal categories/sub categories.

For example, it won't work in this case:
Code:
category 1
sub-category 2
forum 3
forum 4
forum 5
forum 6
forum 7
forum 8
forum 9
category 10
forum 11
forum 12
forum 13
Not to worry, I'll just use consistent categories or maybe even hand build the front page.