1

I just want to ask how can I include a loop in smarty template? For example a simple for loop and a while loop. I read in the documents but I found nothing. I am a beginner in smarty. So if there's a link for the documentation for that please provide me. Thanks guys.

Lajos Veres
  • 13,595
  • 7
  • 43
  • 56
Jerielle
  • 7,144
  • 29
  • 98
  • 164

1 Answers1

2

There are a few builtin plugins:

Lajos Veres
  • 13,595
  • 7
  • 43
  • 56
  • Any chance that you know how to make a loop without an array? like regular for loop from 1-10. My smarty version doesn't support {for} for some reasons :( – Mohammed Joraid Feb 20 '14 at 08:24
  • 1
    On my second link, you can find a section based example: `{section name=foo start=10 loop=20 step=2} {$smarty.section.foo.index} {/section}` – Lajos Veres Feb 20 '14 at 08:56