comparison examples/basic/test.kid @ 21:b4d17897d053 trunk

* Include paths are now interpreted relative to the path of the including template. Closes #3. * The filename is now included as first item in the `pos` tuple of stream events. * Simplified the "basic" example so that it actually ''is'' basic. * Added a more complex example using nested relative includes in [source:/trunk/examples/includes/ examples/includes].
author cmlenz
date Tue, 20 Jun 2006 13:05:37 +0000
parents examples/basic/module/test.kid@518a8520a6e1
children
comparison
equal deleted inserted replaced
20:cc92d74ce9e5 21:b4d17897d053
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"
5 xmlns:py="http://purl.org/kid/ns#"
6 py:extends="'layout.kid'"
7 lang="en">
8 <body class="${bozz}">
9 <ul py:attrs="{'id': 'second', 'class': None}" py:if="len(items) > 0">
10 <li py:for="item in items">Item $prefix${item.split()[-1]}</li>
11 XYZ ${hey}
12 </ul>
13 ${macro1()} ${macro1()} ${macro1()}
14 ${macro2('john')}
15 ${macro2('kate', classname='collapsed')}
16 <div py:content="macro2('helmut')" py:strip="">Replace me</div>
17 <greeting name="Dude" />
18 <greeting name="King" />
19 <span class="greeting">Hello Silicon</span>
20 </body>
21 </html>
Copyright (C) 2012-2017 Edgewall Software