I would like to create a summary template that would organize things into columns, say like 3 rows per column and then start a new column. This is very simplified but the html generated would look something like this:
News Item1
News Item2
News Item3
News Item4
News Item5
News Item6
Seems like there has got to be an easy way of doing this, I just don't know the smarty code well enough.
[SOLVED] News Summary template column repeater
[SOLVED] News Summary template column repeater
Last edited by folco3 on Fri Sep 18, 2009 7:55 pm, edited 1 time in total.
Re: News Summary template column repeater
WHat about calling news twice...
{news number=3}
{news number=3 start=3} in the second column
Ronny
{news number=3}
{news number=3 start=3} in the second column
Ronny
Re: News Summary template column repeater
That's not a bad idea, however I want it so my numbers of columns and grow or shrink based on the number of entries.
Poking around other's code here's what I found that works pretty well:
{if isset($items)}
{foreach from=$items item=entry key=j}
detail_url}">{$entry->company_name}
{if ($j+1) % 5 == 0}
{/if}
{/foreach}
{/if}
Every 5th item is starts a new list item.
Poking around other's code here's what I found that works pretty well:
{if isset($items)}
{foreach from=$items item=entry key=j}
detail_url}">{$entry->company_name}
{if ($j+1) % 5 == 0}
{/if}
{/foreach}
{/if}
Every 5th item is starts a new list item.