Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Adding "Change Thumbnail" button to an asset

daniel40228988
Level 1
Level 1

I noticed that you can add a thumbnail image for the folders in AEM Assets. As in the picture.

thumbnail.png

Do you know if it's possible to add that button to other assets files, such as zip-files and mp4 files?

1 Accepted Solution
sunjot16
Correct answer by
Employee
Employee

The file type for both folders & files/assets are different.

You can create some custom code(maybe using JS) that reads the number of assets on a page/in crx and adds button to them using JS with DOM.

You can get all the assets on the page and append the button to them using a loop or something like that.

On a page, the assets are basically enclosed in anchor tags which when clicked direct us to the clicked asset.

Ex:

let btn = document.createElement("button");

btn.className = "<bla bla bla>";

btn.appendChild(document.createTextNode("<bla bla bla>"));

EachAsset.appendChild(btn);

View solution in original post

1 Reply
sunjot16
Correct answer by
Employee
Employee

The file type for both folders & files/assets are different.

You can create some custom code(maybe using JS) that reads the number of assets on a page/in crx and adds button to them using JS with DOM.

You can get all the assets on the page and append the button to them using a loop or something like that.

On a page, the assets are basically enclosed in anchor tags which when clicked direct us to the clicked asset.

Ex:

let btn = document.createElement("button");

btn.className = "<bla bla bla>";

btn.appendChild(document.createTextNode("<bla bla bla>"));

EachAsset.appendChild(btn);

View solution in original post