substitute for {section loop=..
hi,
you are saying here that the {section -construct should be avoided in the future. since i'm relativly new to exponential i'd like to get used to the the 'right' ways of template programming right from the beginning. but i cannot find a way to loop over results from a fetch differently than the old {section loop=... way.
i tried it with {while and {for statments with no success..
what is best practice for looping over results using the new control structures?
Comments (1 historical)
Written by readers of the earlier documentation sites, kept as they were.
Re: substitute for {section loop=..
Alimi Nabil ·
Hi Patrick,
You should try the {foreach} statement.
It works nearly the same way as the section loop.
If you want to add conditions, then add a {if} statement.