Introduction to templates

Templates are a powerful feature of Awasu that give you complete control over how your channels, reports, etc. will look.

A template file is simply a copy of what the output file should look like, but with placeholders to indicate where you want things like the channel name, item descriptions, etc. to appear. When it comes time to generate the output, Awasu will replace the placeholders with the real information.


Here's a really simple example that generates an HTML list for all the feed items in a channel:

{%REPEAT% FeedItems}
    <li> <a href="{%ITEM-METADATA% url}"> {%ITEM-METADATA% name} </a> </li>

{%REPEAT% FeedItems} instructs Awasu to repeat the enclosed text for each feed item. Each time, {%ITEM-METADATA% url} and {%ITEM-METADATA% name} will be replaced with the appropriate piece of item metadata (i.e. the URL and name respectively).