Hi Michael,
AFAIK, there's currently no simple/easy and portable way to do this. You'd
either need to patch the various Asset implementations to expose such a
property, or get it using your paragraph's model. Seems to me like it's a
fairly reasonable need, so if you're up for it, we'll be happy to apply any
patches you might provide!
Cheers,
-g
On Mar 9, 2010, at 18:33, Michael Kitanovski wrote:
> Hello,
>
> I like to show the creationDate of the image which is placed in the metaData
> section of the DAM. How can I access this property in image.ftl?
> The actual code looks like this:
>
> [#macro image image imageClass]
>
> [#if image?has_content]
> [#assign imageAlt=image.caption!"Image "+content.subtitle!]
>
> [#if image.title?? || image.caption?? || image.copyright?? ||
> image.description??]
> <dl class="${imageClass}">
> <dt><img src="${image.link}" alt="${imageAlt}" /></dt>
> <dd class="zoom"><a href="${stk.getAssetVariation(image,
> 'zoom').link}" title="${i18n['link.zoom.title']}"
> rel="showbox">${i18n['link.zoom']}</a></dd>
> [#if image.caption?? || image.title??]<dd
> class="caption">${image.caption!image.title}</dd>[/#if]
> [#if image.copyright??]<dd
> class="copyright">${image.copyright}</dd>[/#if]
> [#if image.description??]<dd
> class="longdesc">${image.description}</dd>[/#if]
> </dl>
> [#else]
> <img class="${imageClass}" src="${image.link}" alt="${imageAlt}" />
> [/#if]
> [/#if]
>
> [/#macro]
>
>
> I thought that image is of type asset and have tried to access the property
> with following code (it does not work):
>
> ${image.getMetaDataValue('creationDate','')}
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------