Does anyone know how i could edit the news summary template to show the news in boxes 2 wide
example
instead of
news 1
news 2
news 3
news 4
it would be
news 1news 2news 3news 4
the layout would be similar to http://news.bbc.co.uk
many thanks inadvance
News Summary layout
Re: News Summary layout
You can do this with Smarty in the News > Template section:
Code: Select all
<table border="0" cellpadding="0" cellspacing="0" width="100%">
{foreach from=$items item=entry name=newslist}
{if $smarty.foreach.newslist.iteration % 2 == 1}
<tr>
<td>
<h4 id="news{$entry->id}">{$entry->title}</h4>
<p>{$entry->data}</p>
<p>Date: {$entry->date}</p>
</td>
{else}
<td>
<h4 id="news{$entry->id}">{$entry->title}</h4>
<p>{$entry->data}</p>
<p>Date: {$entry->date}</p>
</td>
</tr>
{if ! $smarty.foreach.imagelist.last}
<tr>
<td colspan="2">From here on joined cols in table-layouts!</td>
</tr>
{/if}
{/if}
{/foreach}
</table>
Re: News Summary layout
Actually it was just a guess, but you can do nice things with Smarty ... like change the colors of multiple rows in a table (grey, white, grey, ...) and many many more. I simply love these features because I don't know anything about programming but need some functions for templating purpose and Smarty comes up with really nice solutions that can be easily implemented. Check out the manual at http://smarty.php.net - it comes multilingual!
Regards,
Nils
Regards,
Nils

