![]() |
![]() |
![]() |
|
|||||||
| Custom Templates You have come up with a new really appealing template and keep silence? Why not share it with others. Somebody might love it. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Oct 2006
Posts: 107
![]() |
I wanted to builda little picture-gallery in my eSyndiCat-template. For that I need to know, if I can make a "while loop" with smarty.
__________________
My eSyndiCat-directory for accommodation in europe: http://www.summer-holidays.eu/accomm...ectory-europe/ |
|
|
|
|
|
#2 |
|
eSyndicat Support Team
Join Date: Sep 2006
Posts: 1,428
![]() ![]() ![]() ![]() |
Hi dominik,
Smarty supports only foreach loop. But I think you can use this one in next variant Code:
{assign var="repeat" value='yes'}
{foreach from=$your_aray item=value}
{if ... your case here}
{assign var="repeat" value='no' global=yes}
{/if}
{if $repeat eq 'yes'}
...Your action here
{/if}
{/foreach}
|
|
|
|
|
|
#3 |
|
Join Date: Oct 2006
Posts: 107
![]() |
Thank you very much. That helps me!
__________________
My eSyndiCat-directory for accommodation in europe: http://www.summer-holidays.eu/accomm...ectory-europe/ |
|
|
|
|
|
#4 |
|
eSyndicat Support Team
Join Date: Sep 2006
Posts: 1,428
![]() ![]() ![]() ![]() |
You're welcome dominik,
always at your services. |
|
|
|
|
|
#5 |
|
Join Date: Dec 2011
Posts: 81
![]() |
while loop is not used in smarty.in smarty used only forloop.Forloop in smarty called {foresection}{/forsection}
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|