comparison examples/bench/genshi_text/template.txt @ 720:acf7c5ee36e7 experimental-newctxt

newctxt branch: Merged revisions [678:835] via svnmerge from [source:trunk].
author cmlenz
date Fri, 11 Apr 2008 08:42:11 +0000
parents
children
comparison
equal deleted inserted replaced
567:837786a584d5 720:acf7c5ee36e7
1 <!DOCTYPE html
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
5
6 <head>
7 <title>${escape(title)}</title>
8 </head>
9
10 <body>
11 {% include header.txt %}
12 {% def greeting(name) %}
13 Hello, ${name}!
14 {% end %}
15
16 <div>${greeting(user)}</div>
17 <div>${greeting("me")}</div>
18 <div>${greeting("world")}</div>
19
20 <h2>Loop</h2>
21 {% if items %}<ul>
22 {% for idx, item in enumerate(items) %}\
23 <li{% if idx + 1 == len(items) %} class="last"{% end %}>${escape(item)}</li>
24 {% end %}
25 </ul>{% end %}
26
27 {% include footer.txt %}
28 </body>
Copyright (C) 2012-2017 Edgewall Software