My favorites | Sign in
Project Logo
                
Search
for
Updated Jan 26, 2008 by pawel.knapik
WhatIsTAL  
Template Attribute Language introduction

Introduction

Learn more about TAL:

Details

TAL templates have to be well-formed XML documents, for example:

<div xmlns:tal="http://xml.zope.org/namespaces/tal">
<h1 tal:content="string: Welcome">Header</h1>
<p tal:content="pagedata/introduction">introduction copy here</p>
<a tal:attributes="href: pagedata/links/readmore">read more</a>
</div>

The big advantage of TAL for web designer/developer is that template may be rendered in web browser as-is, without data and parsing. The above example would render like:

<div>
<h1>Header</h1>
<p>introduction copy here</p>
<a>read more</a>
</div>

Assuming variables:

processing the example by parser will generate:

<div>
<h1>Header</h1>
<p>the real introduction copy</p>
<a href="readmore.html">read more</a>
</div>

Sign in to add a comment
Hosted by Google Code