Marcin Kasperski writes:
 > Two questions related to presenting 'last modified at ...' message on
 > HTML page. 
 > 1) I have some pages (for instance my website news page or some indexes)
 > which are dynamically build from another pages (usually via dtml-in -
 > reading elements of some type from some folder). Does there exist any
 > easy way to present the _newest_ bobobase_modification_time for all used
 > elements? Currently on my news page I show 'last modified at 2000/08/14'
 > although in fact this page has been modified at '2000/09/16'...
"bobobase_modification_time" is a "DateTime.DateTime" object.

You can compare such objects and compute the maximal value
as you process the page components, something like:

        <dtml-call "REQUEST.set('maxdate',this().bobobase_modification_time)">
                <!-- ATTENTION: will work only for DTML documents, not 
                                for methods -->
        <dtml-in ...>
          <dtml-if "maxdate < bobobase_modification_time">
            <dtml-call "REQUEST.set('maxdate',bobobase_modification_time)">

        <dtml-var maxdate> <!-- the maximal date -->

 > 2) Similar question related to marking website parts as 'New' or
 > 'Recently changed' in different indexes. What is the easiest way to
 > calculate date of the newest change in the whole folder hierarchy
 > starting from the given folder? 
You first enumerate all objects with "ZopeFind" (documented, e.g.,
in the Zope object reference --> and then compute
the maximum as shown above.


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to