1
mrjingles
MyDownloads Template to display 3 columns
  • 2004/11/10 19:55

  • mrjingles

  • Just popping in

  • Posts: 22

  • Since: 2004/11/10


Hi,

I've recently started to explore and change XOOPS and I'm looking to change the look and feel of my website.

My problem is with the downloads section. When I am viewing the items to download from the section the items are listed in a table that is one column wide.

I would like to have 3 downloads per row in this table instead of the 1.

I have managed to identify that the "mydownloads_viewcat.html" template needs to be changed but I am still 'getting to grips' with Smarty and the templates.

The current code for the particular section is

table width="100%" cellspacing="0" cellpadding="10" border="0">
<
tr>
<
td width="100%" align="center" valign="top">
  
  <{
section name=i loop=$file}>
    <{include 
file="db:mydownloads_download.html" down=$file[i]}>
  <{/
section}>
  
td>tr>
table>


I need to change this code so that the file 'db:mydownloads_download.html' is displayed across the screen in three columns and then the next row starts.

Does anyone have any ideas?

Thanks in advance for any help!!

2
mrjingles
Re: MyDownloads Template to display 3 columns
  • 2004/11/11 11:40

  • mrjingles

  • Just popping in

  • Posts: 22

  • Since: 2004/11/10


Hi, Just thought I'd let you know that I managed to work out the code. Here it is for those who are interested.

<table width="100%" cellspacing="0" cellpadding="10" border="0">
<
tr>
<{
counter assign=totalfiles start=print=false}>
<{
section name=i loop=$file}>
<
td><{include file="db:mydownloads_download.html" down=$file[i]}>td>
<{
counter}>
<{if 
$totalfiles is div by 3}>
tr><tr>
<{/if}>
<{/
section}>
tr>
table>


Thanks!

Login

Who's Online

367 user(s) are online (250 user(s) are browsing Support Forums)


Members: 0


Guests: 367


more...

Donat-O-Meter

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

Latest GitHub Commits