Hi Jun, > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: donderdag 16 oktober 2008 2:11 > To: [email protected] > Subject: [HippoCMS-dev] last modified date > > Hi all, > > I know I can pre-populate the xml with a creation date with > insertcontent.xsl, and I can extract values from the xml and > set the webdav attribute of a file. > > But what happens when I want to keep a last modified date in > my xml file? I would imagine that I need to write a "reverse" > extractor that gets the last modified time from file > attribute and populate the xml file, or I set a trigger to > write the current date upon save. Has anyone > done anything like that before? Could you please share your how-tos?
Writing data after the extrator did its job would create an infinite loop. Every save triggers the extractors. If you need the last modified dat in the XML instead of a WebDAV property you have to use postprocessing [1]. You even may have to override the default postprocessing and insert the current timestamp in the XSLt. Create a new sitemap in extensions/editing called override.xmap. Put yopur custom postprocessXML (original is in /editing/cf2/sitemap.xmap) and create a matcher on ** that sends all other requests to site://editing/sitemap.xmap > > Also, a related question is: how to make a date widget > read-only? I tried "value" widget, but as soon as I click > save, the value is gone. That's a known bug [2]. It used to be possible by setting @readonly="true" on the widget and it should be possible again. [1] http://www.hippocms.org/display/CMS/03.+Developing+templates [2] http://issues.hippo.nl/browse/CMSSIX-192 Jasha Joachimsthal [EMAIL PROTECTED] - [EMAIL PROTECTED] www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 ******************************************** Hippocms-dev: Hippo CMS development public mailinglist Searchable archives can be found at: MarkMail: http://hippocms-dev.markmail.org Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
