[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Creating Basic Zope Applications
webmaster@zope.org
webmaster@zope.org
Tue, 12 Nov 2002 12:48:30 -0500
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/SimpleExamples.stx#3-55
---------------
Most Zope objects have a *bobobase_modification_time* method that
returns the time the object was last modified. We can use this
method in the file library's *index_html* method::
<dtml-var standard_html_header>
<h1>File Library</h1>
<table>
<tr>
<th>File</th>
<th>Last Modified</th>
</tr>
<dtml-in expr="objectValues('File')">
<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>
</table>
<dtml-var standard_html_footer>
% Anonymous User - Aug. 6, 2002 9:38 am:
Is there such a thing as 'bobobase_creation_time' ? How would I get the time an object was created?
The doc says 'Most Zope objects' have bobobase_modification_time - which ones?
Where are these bobobase_* properties documented?
% pdreuw - Nov. 12, 2002 12:48 pm:
a 'bobobase_creation_time' could be easily simulated by using
<dtml-call "manage_addProperty('creation_time',DateTime(),'string')">
when you create the object.
You can work with this even in your DTML-IN tags for sorting
eg.
<dtml-in expr=objectValues("Folder") sort="creation_time">
...
</dtml-in>
There is no problem, if your object doesn´t have this property.