![]() |
Help with Smarty
Sorry for posting here, but there is not section in this forum for Smarty discussions.
I would like to get a solution for this problem. I declare an associative array in a php file and assign it to a Smarty template Code:
$products = array( How can I create a table using Smarty, with a specified number of colums, as the following (let's say columns number is 3): column 1 column 2 column 3 row 1: Adidas Asics Montrail row 2: 12 8 4 row 3: New Balance Puma Salomon row 4: 7 9 11 row 5: Vasque row 6: 6 I know how to do it with 3 rows grouping in a table cell [name] and [products]. This version with 6 rows seems to be complex for me. I appreciate a solution on this. Thanks! |
Re: Help with Smarty
Could you not use divs? Make Adidas 12 look to be on 2 rows, but have it in a block and just use 3 divs across each row like that?
|
Re: Help with Smarty
Someone more advanced in Smarty gave me this challenge. Of course I can use divs, but I need to do it in a table way as requested.
Quote:
|
Re: Help with Smarty
Quote:
Hmm, I'd try to adapt this code: http://www.smarty.net/forums/viewtopic.php?t=1391 |
Re: Help with Smarty
|
Re: Help with Smarty
Here is the solution without using any web resources. I tried to make it as simple as I could.
Code:
{assign var="columns" value=3} |
All times are GMT -8. The time now is 08:59 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.