Here are some examples showing how Dextep statements are working. Look at example.php
and templates/example.html
for understanding.
{if}
This example shows how {if}
statement works. If you'll enter your name and press "Go" then following form will be replaced with another message. Try it:
{foreach}
This example outputs multidimensional array passed from script.
{for}
This example outputs calendar for current month using {for}
statement.
Mon | Tue | Wed | Thu | Fri | Sat | Sun |
---|---|---|---|---|---|---|
{@%weekday++} {/for} {for var=%day from=1 to=$calendar.nDays step=1} {if %weekday>7} | ||||||
5} class="weekend"{/if}>{%day} | {@%weekday++} {/for} {for var=%weekday from=%weekday to=7 step=1}5} class="weekend"{/if}> | {/for}
{include}
This example shows includes in action.
{include subfolder/example}