|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
joenuts Smarty n00b
Joined: 07 Jan 2005 Posts: 1
|
Posted: Fri Jan 07, 2005 3:36 pm Post subject: setting section 'loop' value |
|
|
I would like to set the section loop value to be the length of the array, plus one. The only way so far I have found to accomplish this is like so :
{assign var=Length value=$pFieldList|@count}
{section name=BlankRowLoop start=0 loop=$Length+1}
<td class="DataEditCell"><insert html space here>
{/section}
I have tried variations on the loop, like loop=$pFieldList+1, loop=$pFieldList++, loop=`$pFieldList|@count`+1, all without succes.
I'm guessing there is a way to do it easily, with either foreach, or section, but can not find it / figure it out.
Suggestions are appreciated.
Thanks
-Joe |
|
Back to top |
|
kilburn Smarty Rookie
Joined: 08 Oct 2004 Posts: 21
|
Posted: Mon Jan 10, 2005 7:00 pm Post subject: |
|
|
Maybe....
Code: | {section name=l loop=$pFieldList}
<td class="DataEditCell"> </td>
{/section}
<td class="DataEditCell"> </td> |
|
|
Back to top |
|
|
|
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
|