Jump to content

Foreach question..


skshost

Recommended Posts

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>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated