[EXTDAM-19] Research. Verify the image and DAM templating fns Created: 12/Nov/19  Updated: 10/Jan/20  Resolved: 06/Jan/20

Status: Closed
Project: External DAMs
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Story Priority: Neutral
Reporter: Laura Delnevo Assignee: Yen Lac Tue
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: 1h
Time Spent: 3d 2.5h
Original Estimate: Not Specified

Issue Links:
Relates
relates to EXTDAM-32 Make getAssetMap() and getRendition()... Closed
relates to EXTDAM-33 Make Image templating functions work ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: DAMs backend
Sprint: Add-Ons 28
Story Points: 5

 Description   

Verify the image and DAM templating fns



 Comments   
Comment by Yen Lac Tue [ 31/Dec/19 ]

Config linkField with external-dams:

detail:
   form:
    properties:
      linkField:
        label: linkField
        $type: linkField
        buttonSelectNewLabel: Select new ...
        buttonSelectOtherLabel: Select another ...
        preview:
          implementationClass: info.magnolia.contacts.app.ContactPreview
        chooser:
           workbenchChooser:
             appName: dam
Comment by Yen Lac Tue [ 02/Jan/20 ]

For DAM templating functions, consider check implementation of Bynder and S3 to make these methods work correctly:

  • getAssetMap (fail at getMetadata method)
  • getRendition

Sample code:

[#assign itemKey = "bynder:605911F5-380D-4628-8D16CC6611A3059F"]
[# assign myAsset = damfn.getAsset(itemKey)]
<img src="${damfn.getRendition(myAsset, "small").getLink()!}"/>
[# assign myAssetMap = damfn.getAssetMap(myAsset) ]
fileSize: ${myAssetMap.fileSize}
Comment by Yen Lac Tue [ 06/Jan/20 ]

Image templating function imgfn doesn't work with external dam.

[#assign itemKey = "bynder:605911F5-380D-4628-8D16CC6611A3059F"]
[#assign bynder = damfn.getAsset(itemKey)]
[#assign binary = bynder.getContentStream()]
[#if binary??]
    [#assign imgLink = imgfn.getImageVariationLinkFromBinary(binary,'original')]
    <img src="${imgLink}" class="img-responsive img-thumbnail">
[/#if]
Comment by Yen Lac Tue [ 06/Jan/20 ]

Hi ilgun, oanh.thai,

I'm done with verifying image and dam templating functions.

The imgfn doesn't work with external-dam.

The damfn works except for getAssetMap() and getRedition().

Do you have any comment on these functions and any action for this ticket?

Thanks!

Generated at Mon Feb 12 01:51:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.