Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Formatting with tags!

Quote Reply
Formatting with tags!
I was wondering if it is possible to use a loop to show categories rather than preformatting. (You can ignore the issues regarding getting everything into a loop) ....I just need some help with the tags. I have two columns working but I can't get 2+ working :(

Code:
<table width="90%" cellpadding="10">
<tr>
<%loop category_loop%>

<%if loop_iteration % '2' and loop_iteration > '1'%>
</tr><tr>
<%endif%>

<td>
Some Stuff
</td>

<%endloop%>
</tr>
</table>

This correctly formats in two columns but when I change the 2 to 3 it doesn't. Can anyone see how to change that code so I could change the number of columns?

Thanks.
Quote Reply
Re: [Paul] Formatting with tags! In reply to
Hi Paul,

Shouldn't there be a <td> and </td> outside of loop tag??

Just typing out loud here:

<table width="90%" cellpadding="10">
<tr><td>
<%loop category_loop%>
<tr>
<%if loop_iteration % '2' and loop_iteration > '1'%>
<td> Some Stuff </td>
<%endif%>
</tr>
<%endloop%>
</td></tr>
</table>

Maybe??


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jun 20, 2002, 4:31 PM
Quote Reply
Re: [Ian] Formatting with tags! In reply to
Not for just two columns or were you referring to using more than two?
Quote Reply
Re: [Paul] Formatting with tags! In reply to
Hi Paul, yes I was thinking for any number of coloumns above 1. I did not test this of courseAngelic


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Formatting with tags! In reply to
Well the only way to check is to try it out...I'll give it a whirl, thanks...
Quote Reply
Re: [Ian] Formatting with tags! In reply to
Actually looking at it I don't think it will work as straight away it will start with:

<table ..>
<tr>
<td>
<tr>

...and then it would ignore everything not divisible by x (due to the if block)........thanks though.

Last edited by:

Paul: Jun 21, 2002, 8:02 AM
Quote Reply
Re: [Paul] Formatting with tags! In reply to
Yeah.... sorry for spoiling your thread, I hope I havnt just burried it! But I couln't let you talk to yourself, I know what thats like!Tongue


http://www.iuni.com/...tware/web/index.html
Links Plugins