-
Improvement
-
Resolution: Obsolete
-
Major
-
None
-
0.9
-
None
We currently use an FTL recursive function which doesn't work in all cases and probably introduces too much complexity for a simple template (see /magnolia-templating-kit/src/main/resources/mtk/templates/includes/teaserPage.ftl). Once the issue we depend upon is resolved one could do
[#-- If no overriding image has been defined, try to get the first image in the target. --] [#if !hideTeaserImage && !image?has_content] [#assign imageId = cmsfn.findFirstProperty(target, "image")] [#if imageId?has_content] [#assign image = damfn.getRendition(imageId, "original")] [/#if] [/#if]
Acceptance criteria
- depends upon
-
MAGNOLIA-6484 Provide templating function to get first occurrence of a node property
- Open
- mentioned in
-
Page Loading...