tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/13746-image-modified-dateCascade CMS: Discussion 2016-03-01T21:37:45Ztag:help-archives.hannonhill.com,2010-02-09:Comment/392995322016-03-01T19:39:09Z2016-03-01T21:07:34ZImage Modified Date<div><p>Hi,</p>
<p>Unless your image is coming from a file chooser in the page's
Data Definition, it might be a little difficult to accomplish
this.</p>
<p>If the image is within a WYSIWYG field, one idea that comes to
mind is to somehow parse for all <code><img></code> tags,
grab the file path from the <code>src</code> attribute, use the
Locator Tool to read in the File asset, and rewrite the link based
on the returned File object's last modified date. Definitely just
an idea, I am not sure how simple that would be or if it's even
possible.</p>
<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/392995322016-03-01T20:48:57Z2016-03-01T21:07:34ZImage Modified Date<div><p>Ryan,</p>
<p>What setting am I missing to make it easy to accomplish with a
file chooser? I’m guessing I need to check a box on the index
block?</p></div>Matthew Ferderertag:help-archives.hannonhill.com,2010-02-09:Comment/392995322016-03-01T21:13:19Z2016-03-01T21:13:19ZImage Modified Date<div><p>Hi Matthew,</p>
<p>Chooser fields themselves won't include this information, but
what you can do is use the site and path information in conjunction
with the Locator Tool to read the asset and get it's last modified
date.</p>
<p>Note: the Locator Tool will return a Date object, so you will
need to use the <code>Date#getTime()</code> method to get the
timestamp if that's what you need.</p>
<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/392995322016-03-01T21:23:19Z2016-03-01T21:23:19ZImage Modified Date<div><p>Thanks Ryan. That helps.</p></div>Matthew Ferderertag:help-archives.hannonhill.com,2010-02-09:Comment/392995322016-03-01T21:37:45Z2016-03-01T21:37:45ZImage Modified Date<div><p>Not a problem at all, Matthew. I am glad to hear I was able to
point you in the right direction.</p>
<p>I'm going to go ahead and close this discussion, please feel
free to comment or reply to re-open if you have any additional
questions.</p>
<p>Have a great day!</p></div>Ryan Griffith