You are not logged in Log in Join
You are here: Home » Members » Lalo's page at Zope.org » HiperDom XML templates » An example of an HiperDom template

Log in
Name

Password

 
 

<?xml version="1.0"?>
<html><head>
<title hdom:text="title">HiperDom Exemple</title>
Here the text HiperDom Exemple will be replaced by the value of the property title (a common scenario in DTML).
</head><body>

<h2 hdom:text="title">HiperDom Exemple</h2>

<p>A common DTML operation...</p>

<hr width="80%"/>

<ul>

<li hdom:loop="objectValues">
<a href="foo.html" hdom:method="objlink">Foo</a></li>
This list item will be rendered once for each item in the list returned by objectValues.

For each rendering of the a (link) tag, its attributes (href) and the contents will be edited by the method objlink.
<li hdom:dummy="1">
<a href="bar.html">Bar</a></li>

<li hdom:dummy="1">
<a href="duh.html">Duh</a></li>

<li hdom:dummy="1">
<a href="whee.html">Whee</a></li>
These three dummy elements will not be rendered.
</ul>

<p hdom:condition="sometimes">All right, that was cool.</p>
This paragraph will only be rendered when the method sometimes returns true.
</body></html>