<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<br>Hi Nick, <br><br>you know this?<br><br>CmsTemplateModules cms = new CmsTemplateModules(pageContext, request, response);<br>CmsObject cmso = cms.getCmsObject();<br>CmsResource cmsr = cmso.readResource( uri );<br>CmsFile file = new CmsFile( cmsr ); // or Ressource or Folder<br>file.getDateContent() // Returns the date of the last modification of the content of this resource.<br><br>For me it is working fine.<br><br>Aden<br><br><blockquote><hr>Date: Tue, 8 Jan 2008 12:05:31 -0600<br>From: ndesteffen@tlcontact.com<br>To: opencms-dev@opencms.org<br>Subject: [opencms-dev] Get Content's Last Modified Date<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass EC_p.MsoNormal, .ExternalClass EC_li.MsoNormal, .ExternalClass EC_div.MsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman';}
.ExternalClass a:link, .ExternalClass EC_span.MsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass EC_span.MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass EC_span.EmailStyle17
{font-family:Arial;color:windowtext;font-weight:normal;font-style:normal;text-decoration:none none;}
@page Section1
{size:8.5in 11.0in;}
.ExternalClass EC_div.Section1
{page:Section1;}
</style>
<div class="EC_Section1">
<p class="EC_MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hi,<br>
I’m trying to get the date that a page was last modified. When I use the
following code in a .jsp the date that is returned is the modified date of the
template. Any ideas on how to get at the content’s date? It has to be
available as its listed in the workspace.</span></font></p>
<p class="EC_MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="EC_MsoNormal"><b><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; font-weight: bold;">org.opencms.flex.CmsFlexController
controller = org.opencms.flex.CmsFlexController.getController(request);</span></font></b></p>
<p class="EC_MsoNormal"><b><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; font-weight: bold;">java.util.Date expired = new
java.util.Date(controller.getDateLastModified());</span></font></b></p>
<p class="EC_MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="EC_MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Thanks!</span></font></p>
<p class="EC_MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="EC_MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Nick DeSteffen</span></font></p>
<p class="EC_MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Web Developer - CarePages Inc.</span></font></p>
<p class="EC_MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><a href="http://www.carepages.com" target="_blank">http://www.carepages.com</a></span></font></p>
<p class="EC_MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><a href="mailto:ndesteffen@tlcontact.com">ndesteffen@tlcontact.com</a></span></font></p>
<p class="EC_MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
<p class="EC_MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
<pre>----
Harness the compassion to help when someone needs
you. We're excited to announce 'We Carry Each
Other,' a collection of inspiring stories and
practical tips on how to cope and care from Eric
and Sharon Langshur, the founders of CarePages.
Look at your local major bookseller or visit
http://www.carepages.com/we_carry.jsp</pre>
</blockquote><br /><hr />Kostenlos bloggen + eigene Homepage + Fotospeicher = MSN Spaces <a href='http://clk.atdmt.com/GBL/go/mcrsddsp0020000048gbl/direct/01/' target='_new'>Hier klicken! </a></body>
</html>