tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/19321-how-do-i-add-last-updated-page-informationCascade CMS: Discussion 2018-10-18T20:37:41Ztag:help-archives.hannonhill.com,2010-02-09:Comment/378563182015-09-07T12:43:31Z2015-09-07T12:43:31ZHow Do I add last updated page information <div><p>Hi Uthman,</p>
<p>Which type of formats are you working with: Velocity or
XSLT?</p>
<p>The reason why I asked is that you can pull page information
from the index block calling-page, but depending on what type of
format you have, the information you want is processed
differently.</p>
<p>Additional question: can you handle Java objects (like
<code>Date</code>), or can you handle Xalan extension?</p>
<p>Wing</p></div>Wing Ming Chantag:help-archives.hannonhill.com,2010-02-09:Comment/378563182015-09-08T05:07:22Z2015-09-08T12:00:22ZHow Do I add last updated page information <div><p>Hi Wing</p>
<p>I am working with XSLT format.</p>
<p>From index block what argument name should i use to fetch last
updated date information. e.g current-page/start-date ,
current-page/end-date under meta data tab of page.</p>
<p>I can handle C# Date objects as my site is running on IIS.I
guess installing JVM would require several other
configurations.</p>
<p>Please advise</p>
<p>Thankyou</p></div>usmanehsan0613tag:help-archives.hannonhill.com,2010-02-09:Comment/378563182015-09-08T12:30:53Z2015-09-08T12:30:53ZHow Do I add last updated page information <div><p>Hi Uthman,</p>
<p>Using a <a href="http://help.hannonhill.com/kb/frequently-asked-questions/create-a-calling-page-index-block">
Calling Page Index Block</a>, you can use <a href="https://github.com/hannonhill/XSLT-Workbook/blob/master/QuickEdit/quickedit.xml">
this example XSLT format</a> as a starting point; just remove the
link and leave the date bits and you should be good to go. Here is
a <a href="https://github.com/hannonhill/Velocity-Cookbook/blob/master/QuickEdit/quickedit.vm">
Velocity version</a> of this Format that uses a Calling Page Index
Block.</p>
<p>Alternatively, if you wanted to use Velocity, you could use
<code>$currentPage.lastModified</code> and the <a href="http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/generic/DateTool.html">
Date Tool to format the date</a>:</p>
<pre>
<code>$_DateTool.format("MM/dd/YYYY", $currentPage.lastModified)</code>
</pre>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/378563182015-09-08T12:33:43Z2015-09-08T12:33:43ZHow Do I add last updated page information <div><p>You can use <code>system-page/last-modified</code> (a
timestamp). In _common:formats/include, there is a format named
format-date that you can use to format the timestamp, or you can
use my <a href="http://www.upstate.edu/cascade-admin/formats/xslt/building-library/java-extension/java-time-methods.php">
java-time-methods</a> library to do the same thing.</p>
<p>Wing</p></div>Wing Ming Chantag:help-archives.hannonhill.com,2010-02-09:Comment/378563182015-09-08T13:27:25Z2015-09-08T13:27:25ZHow Do I add last updated page information <div><p>Hi,</p>
<p>For reference, here is the <a href="https://github.com/hannonhill/XSLT-Workbook/blob/master/Uncategorized/format-date.xsl">
format-date XSLT Format include</a> <a href="http://help.hannonhill.com/discussions/how-do-i/19321-how-do-i-add-last-updated-page-information#comment_37870434">
Wing mentioned</a> in-case you don't have it.</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/378563182015-09-09T05:43:20Z2015-09-09T05:43:20ZHow Do I add last updated page information <div><p>Thanks Wing and Ryan for your support.</p>
<p>First i am not able to fetch last-modified value ... here is the
format i am using ..</p>
<p><!----></p>
<pre>
<code><xsl:variable name="front"/>
<xsl:variable name="back">#highlight</xsl:variable>
<xsl:template match="/system-index-block/calling-page/system-page">
<xsl:value-of select="display-name"/>
<xsl:text> Last updated: </xsl:text>
<xsl:value-of select="last-modified"/>
</xsl:template></code>
</pre>
<p><a href="/xsl:stylesheet">/xsl:stylesheet</a></p>
<p>as suggested by Ryan ( this example XSLT format).... Display
name is coming fine but last-modified date is blank.</p>
<p>Can you please suggest, whats wrong in the format.</p>
<p>Many Thanks<br>
Uthman</p></div>usmanehsan0613tag:help-archives.hannonhill.com,2010-02-09:Comment/378563182015-09-09T06:05:24Z2015-09-09T06:05:24ZHow Do I add last updated page information <div><p>I selected system metadata and now getting the last-modified
value.</p>
<p>But everytime i do publish the page it picks up publish date not
when the content was edited.</p>
<p>Is it possible to get the last-modified date of content not the
publish date. ?</p>
<p>Looking forward</p>
<p>Many Thanks,<br>
Uthman</p></div>usmanehsan0613tag:help-archives.hannonhill.com,2010-02-09:Comment/378563182015-09-09T15:47:31Z2015-09-09T15:47:31ZHow Do I add last updated page information <div><p>Thank you for the follow up, Uthman, glad to hear you were able
to access the date by including the system metadata in your Index
Block.</p>
<blockquote>
<p>Is it possible to get the last-modified date of content not the
publish date. ?</p>
</blockquote>
<p>Strange, using <code>last-modified</code> should definitely give
you the last modified date and not the last published date, which
would be <code>last-published-on</code>. Can you confirm you are
not using <code>last-published-on</code>?</p>
<p>Thanks</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/378563182015-09-10T04:06:34Z2015-09-10T04:06:34ZHow Do I add last updated page information <div><p>Hi Ryan,</p>
<p>I tried again with content edited , Its giving me last modified
date for content.</p>
<p>Thanks for your support</p>
<p>Regards,<br>
Uthman</p></div>usmanehsan0613