[Zope] error in Zope book
michael angelo ruberto
michaelangelo@intelligenesis.net
Fri, 3 Nov 2000 18:39:25 -0500
in chapter 5 the example Creating a File Library has an error in the sorting
method.
<dtml-var standard_html_header>
<h1>File Library</h1>
<table>
<tr>
<th><a href="&dtml-URL0;?sort=name">File</a></th>
<th><a href="&dtml-URL0;?sort=date">Last Modified</a></th>
</tr>
<dtml-if expr="_.has_key('sort') and sort=='date'">
---ERROR--------------------------------------------------------------------
-------
<dtml-in expr="objectValues('File')"
~this should be <dtml-in expr="PARENTS[0].objectValues(['File'])"
~it doesn't work otherwise.
---ERROR--------------------------------------------------------------------
-------
sort="bobobase_modification_time" reverse>
<tr>
<td><a href="&dtml-absolute_url;"><dtml-var
title_or_id></a></td>
<td><dtml-var bobobase_modification_time fmt="aCommon"><td>
</tr>
</dtml-in>
<dtml-else>
---ERROR--------------------------------------------------------------------
-------
<dtml-in expr="objectValues('File')" sort="id">
~same as above.
---ERROR--------------------------------------------------------------------
-------
<tr>
<td><a href="&dtml-absolute_url;"><dtml-var
title_or_id></a></td>
<td><dtml-var bobobase_modification_time fmt="aCommon"><td>
</tr>
</dtml-in>
</dtml-if>
</table>
<dtml-var standard_html_footer>
-<mike>-