Skip to content

Commit

Permalink
set path/alt.text independently of DAM asset
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Jan 23, 2024
1 parent b618903 commit ea74409
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ protected List<ImageArea> buildAreas() {
private void initPropertiesFromDamAsset(ValueMap properties) {
Asset asset = media.getAsset();
if (asset != null) {
fileReference = asset.getPath();
alt = asset.getAltText();

com.day.cq.dam.api.Asset damAsset = asset.adaptTo(com.day.cq.dam.api.Asset.class);
if (damAsset != null) {
boolean titleFromAsset = properties.get(PN_TITLE_VALUE_FROM_DAM, currentStyle.get(PN_TITLE_VALUE_FROM_DAM, true));
boolean uuidDisabled = currentStyle.get(PN_UUID_DISABLED, false);

fileReference = damAsset.getPath();
alt = asset.getAltText();

if (!uuidDisabled) {
uuid = damAsset.getID();
}
Expand Down

0 comments on commit ea74409

Please sign in to comment.