hi,
i've come up with a solution to display links in 3 columns - it's a minor tweak of the code in the link below for 2 columns...
See this thread for the 2 colum code
if someone can have a look at the global i've made and show me how to extract the html back out into the template it would be great! it would be a lot tidier if it returned a either true / false and the html was selected in the template.
here's how I did it anyway...
1. make a global called "finishcolumns"
my $num = $_[0];
$num++;
if ( $num % 3 ) {
return "<TD width=\"200\"> </TD><TD width=\"200\"> </TD>";
} else {
return "<TD width=\"200\"> </TD>";
}
}
2. replace the code below in the 2 column mod...
<TD></TD><TD></TD>
<%endif%>
with this...
and you're done.
let me know if anyone can see a way to make it better.
cheers,
regan.
i've come up with a solution to display links in 3 columns - it's a minor tweak of the code in the link below for 2 columns...
See this thread for the 2 colum code
if someone can have a look at the global i've made and show me how to extract the html back out into the template it would be great! it would be a lot tidier if it returned a either true / false and the html was selected in the template.
here's how I did it anyway...
1. make a global called "finishcolumns"
Code:
sub { my $num = $_[0];
$num++;
if ( $num % 3 ) {
return "<TD width=\"200\"> </TD><TD width=\"200\"> </TD>";
} else {
return "<TD width=\"200\"> </TD>";
}
}
2. replace the code below in the 2 column mod...
Code:
<%if row_num % 2 eq 1%> <%-- balance the trailing rows --%> <TD></TD><TD></TD>
<%endif%>
with this...
Code:
<%finishcolumns($row_num)%>and you're done.
let me know if anyone can see a way to make it better.
cheers,
regan.