sempare-delphi-template-engine icon indicating copy to clipboard operation
sempare-delphi-template-engine copied to clipboard

add 'else' , 'onfirst', 'onlast', 'onloop' to 'for' loop

Open sempare opened this issue 2 years ago • 0 comments

this is useful for cases when the for loop is empty and means the developer does not need to create an additional if statement.

e.g.

<% for x in items %>
    <% onfirst %>
        <ol>
   <% onlast %>
        </ol>
   <% onloop%>
        <li>item: <% x %></li>
    <% else %>
    there are no items.
<% end %>

sempare avatar Jul 16 '22 12:07 sempare