Step 5: Layout
We use the template engine to seperate layout from logic, php apps usually have logic & content mixed, we all know this is a bad practice but it happens a lot.
Also ... designers ... designers want to do one thing, design, programmers want to do one thing, program (although we have to do extensive analysis before coding etc ;)).
So this gives us the oppertunity to do this and everybody is happy, off course it opens up other possibilities like skinning etc, feel free to be creative.
| tpl/main.tpl |
|
Zen-ng framework example
{varfile=content}
|
Later we will replace this file by something nicer, but this already demonstrates
more of the custom tags that are allowed.
| tpl/main.tpl |
{foreach=courses}- {courses}
{/fe}
|