Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Problem with Dynamic Table Columns

 
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
phuture
Smarty Rookie


Joined: 12 Jan 2005
Posts: 5

PostPosted: Wed Jan 12, 2005 1:01 pm    Post subject: Problem with Dynamic Table Columns Reply with quote

Hi everyone!

I have a problem here. I was adapting the trick explained in this thread:

http://www.phpinsider.com/smarty-forum/viewtopic.php?t=1391

My code in the template looks like:

Code:
 <table border=0 width="100%">
  {section name=parent loop=$aoShow step=$cols}
 
  <tr>
    {section name=td start=$smarty.section.parent.index loop=$smarty.section.parent.index+$cols}
    <td colspan="2" width="50%"><img src="{$smarty.const.EXTPATH_IMGPATH}{$aoShow[td]->FieldGet("pg_img")|default:"produkte/kalender/taschenkalender/taschenkalender.jpg"}"></td>     
    {/section}
  </tr>
 
 
  {/section}
 
 
</table>


This works perfectly until the value of the loop step in the inner section becomes higher than the total amount of rows. I thought smarty will simply ignore this, but it seems that in this case smarty stops parsing.

Has anyone a solution? I am using smarty 2.6.6.

Regards,
PH
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP