On Mar 10, 2010, at 13:23, Michael Kitanovski wrote:
>
> Hi Grégory,
>
> thank you for your answer. I have a second question. Following line of code
>
> stk.getAssetVariation(image, 'zoom').link
>
> uses the STKUtil class. Where ist the stk variable declared and initialized?
> Or is this a implicit variable.
It's currently registered by the STK(Template|Paragraph)Render, I think. It's
an instance of the STKUtil class.
>
> cheers
> Michael
>
>
> On Mar 9, 2010, at 7:54 PM, Grégory Joseph wrote:
>
>>
>> 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]>
>> ----------------------------------------------------------------
>>
>
>
> ----------------------------------------------------------------
> 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]>
----------------------------------------------------------------