1
figu78
wfdonwloads template
  • 2008/7/1 22:28

  • figu78

  • Just popping in

  • Posts: 60

  • Since: 2006/8/19


Hello guys,

I wonder if someone could help me to modify wfdownloads templates. what i want to do is to show all the files under every category like in a gallery.

I mean, right now the module has a table with one column, and there is a loop that feeds this table, so everytime you add a new file, the file is shown at the top of the catergory over the rest of files.

<table width="100%" cellspacing="0" cellpadding="10" border="0">
<tr>
<td width="100%">
<!-- Start link loop -->
<{section name=i loop=$file}>
<{include file="db:wfdownloads_download.html" down=$file[i]}>
<{/section}>
<!-- End link loop -->
</td>
</tr>
</table>


What i want to create is a table with 3 columns and feed it to have the latest files at the top and from the right to the left, so the last file would be at the left-top corner.

Could someone help me with this issue??

Thanks in advance,
David

2
figu78
Re: wfdonwloads template
  • 2008/7/2 11:44

  • figu78

  • Just popping in

  • Posts: 60

  • Since: 2006/8/19


I have found this, but i don't know how to use it:

{* Monte Möhrt March 4, 2002 *}
{* $cols is the number of columns you want *}
<TABLE border=1>
<TR>
{section name=numloop loop=$data}
<TD>{$data[numloop]}</TD>
{* see if we should go to the next row *}
{if not ($smarty.section.numloop.rownum mod $cols)}
{if not $smarty.section.numloop.last}
</TR><TR>
{/if}
{/if}
{if $smarty.section.numloop.last}
{* pad the cells not yet created *}
{math equation = "n - a % n" n=$cols a=$data|@count assign="cells"}
{if $cells ne $cols}
{section name=pad loop=$cells}
<TD>&nbsp;</TD>
{/section}
{/if}
</TR>
{/if}
{/section}
</TABLE>

This is for any numer of columns, anyone knows how to adapt it??

Thanks in advance,
David

3
figu78
Re: wfdonwloads template
  • 2008/7/3 7:50

  • figu78

  • Just popping in

  • Posts: 60

  • Since: 2006/8/19


UP! Anyboy knows how to do this with smarty???

Login

Who's Online

153 user(s) are online (89 user(s) are browsing Support Forums)


Members: 0


Guests: 153


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits