[MGNLSTK-1426] STKTemplatingFunctions: Provide functions to get image variations also for non assets (plain binary nodes) Created: 02/Sep/14 Updated: 06/Oct/14 Resolved: 04/Oct/14 |
|
| Status: | Closed |
| Project: | Magnolia Standard Templating Kit (closed) |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.8.4 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Christian Ringele | Assignee: | Federico Grilli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | support | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Patch included: |
Yes
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Release notes required: |
Yes
|
||||||||||||
| Date of First Response: | |||||||||||||
| Description |
|
Since 5.x all images used in website scope are not binary nodes, but links to dam:assets form the assets app. The upload possibility was removed. Problem: See: Use case: Solution: I added a patch, which works well. //Possibility 1 [#assign link = stkfn.getImageVariationLinkFromBinary(binaryNode, model)] <img src=${link!}> //Possibility 2 [#assign renditionName = stkfn.getRenditionName(model)] [#assign link2 = stkfn.getImageVariationLinkFromBinary(binaryNode, renditionName)] <img src=${link2!}> In order for the image/binary to be resolved, the according workspace has to be added to the URI2RepositoryMapping in the server configuration (see print screen "URI2RepositoryMapping.jpg". Open work:
|
| Comments |
| Comment by Christian Ringele [ 02/Sep/14 ] |
|
see last user comment. |
| Comment by Christian Ringele [ 11/Sep/14 ] |
|
Updated Patch with 2 null checks |
| Comment by Federico Grilli [ 02/Oct/14 ] |
|
Verify if there's a need for STKTemplatingFunctions.getRenditionName(..) or if we can put the logic therein contained into STKTemplatingFunctions.resolveImageVariationName(..) instead. |
| Comment by Federico Grilli [ 02/Oct/14 ] |
|
For the release notes/docu
//Example 1 [#assign link = stkfn.getImageVariationLinkFromBinary(binaryNode, model)] <img src=${link!}> //Example 2 [#assign variationName = stkfn.resolveImageVariationName(model)] [#assign link2 = stkfn.getImageVariationLinkFromBinary(binaryNode, variationName)] <img src=${link2!}> |