Take a look at the Geeklog Caching Template Library Wiki page:
http://wiki.geeklog.net/index.php/Caching_Template_Library
It shows how you can use logic in your template and how to access default template variables like
'xhtml'
'image_type'
'site_url'
'site_admin_url'
'layout_url'
'anonymous_user'
'device_mobile'
'front_page'
'current_url'
and how to use the built in logic like:
Text Formatted Code
{!if front_page}
<p>Place HTML here that will only show on front page</p>
{!endif}
One of the Geeklog Core Developers.