Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ protected void initModel() {
super.initModel();
boolean altValueFromDAM = properties.get(PN_ALT_VALUE_FROM_DAM, currentStyle.get(PN_ALT_VALUE_FROM_DAM, true));
boolean titleValueFromDAM = properties.get(PN_TITLE_VALUE_FROM_DAM, currentStyle.get(PN_TITLE_VALUE_FROM_DAM, true));
boolean langValueFromDAM = properties.get(PN_LANG_VALUE_FROM_DAM, currentStyle.get(PN_LANG_VALUE_FROM_DAM, true));
boolean isDmFeaturesEnabled = currentStyle.get(PN_DESIGN_DYNAMIC_MEDIA_ENABLED, false);
displayPopupTitle = properties.get(PN_DISPLAY_POPUP_TITLE, currentStyle.get(PN_DISPLAY_POPUP_TITLE, true));
boolean uuidDisabled = currentStyle.get(PN_UUID_DISABLED, false);
Expand Down Expand Up @@ -182,6 +183,9 @@ protected void initModel() {
if (titleValueFromDAM) {
title = StringUtils.trimToNull(asset.getMetadataValue(DamConstants.DC_TITLE));
}
if (langValueFromDAM) {
lang = asset.getMetadataValue(DamConstants.DC_LANGUAGE);
}

//check "Enable DM features" checkbox
//check DM asset - check for "dam:scene7File" metadata value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
data-cmp-hook-image="imageV3"
class="cmp-image${!wcmmode.disabled ? ' cq-dd-image' : ''}"
itemscope itemtype="http://schema.org/ImageObject">
<sly data-sly-set.contentLang="${navItem.page.properties.contentLang}"/>
<a data-sly-unwrap="${!image.imageLink.valid}"
class="cmp-image__link"
data-sly-attribute="${image.imageLink.htmlAttributes}"
Expand All @@ -37,9 +38,12 @@
loading="${image.lazyEnabled ? 'lazy' : ''}"
class="cmp-image__image"
itemprop="contentUrl"
width="${image.width}" height="${image.height}"
width="${image.width}"
height="${image.height}"
sizes="${image.sizes}"
alt="${image.alt || true}" title="${image.displayPopupTitle && image.title}"/>
alt="${image.alt || true}"
title="${image.displayPopupTitle && image.title}"
lang="${image.lang && image.lang != contentLang ? image.lang : ''}"/>
</a>
<span class="cmp-image__title" itemprop="caption" data-sly-test="${!image.displayPopupTitle && image.title}">${image.title}</span>
<meta itemprop="caption" content="${image.title}" data-sly-test="${image.displayPopupTitle && image.title}">
Expand Down
Loading