skshost Posted March 31, 2007 Share Posted March 31, 2007 So I'm actually changing my homepage quite a bit, I'll share when I'm finished. But I've got "Most Popular Articles" listed with the included foreach, but I'd like to list the 4 in 2 rows and 2 columns rather than just 4 rows.. how would I change this: <table width=100%> {foreach key=num item=kbarticle from=$kbmostviews} <tr> <td> [img=images/support/article.gif] [b][url="knowledgebase.php?action=displayarticle&catid={$kbarticle.category}&id={$kbarticle.id}"]{$kbarticle.title}[/url][/b] {$kbarticle.article|truncate:50:"..."} <font style="color:#A8A8A8;font-size:10px;">{$LANG.knowledgebaseviews}: {$kbarticle.views}</FONT> </td> </tr> {/foreach} </table> 0 Quote Link to comment Share on other sites More sharing options...
trine Posted March 31, 2007 Share Posted March 31, 2007 take a look at the smarty site, there is an example there on how to do just that! 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted March 31, 2007 Author Share Posted March 31, 2007 Wait... I got my answer here: http://smarty.incutio.com/?page=table_foreach 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.