Solved! Go to Solution.
Views
Replies
Total Likes
Hi @vinuu123 ,
I think you might be talking about page property Thumbnail? Assuming that you have to check the custom implemented code where fetching the thumbnail and have added if else condition - should be in HTL. If thumbnail image has been configured render it, otherwise your required expectation implementation goes there. If it's not the page property even in that case above code approach should work.
Hope that helps!
Regards,
Santosh
Could please elaborate the problem here ?
for particular pages, if thumbnail is not present we can add in page properties. but here the scenario is, if thumbnail is not present for already existing pages, how to handle the issue if it is not through authoring for multiple pages
Hi @vinuu123 ,
I think you might be talking about page property Thumbnail? Assuming that you have to check the custom implemented code where fetching the thumbnail and have added if else condition - should be in HTL. If thumbnail image has been configured render it, otherwise your required expectation implementation goes there. If it's not the page property even in that case above code approach should work.
Hope that helps!
Regards,
Santosh
If you want to add thumbnails to pages in Adobe Experience Manager (AEM) where the thumbnail is not present and you want to do this for multiple pages at once, you can use the AEM Asset API and a script to automate the process. Here is one way you can do this:
Write a script that uses the Asset API to search for pages without thumbnails. You can use the query method of the AssetManager class to search for assets that meet certain criteria, such as having a specific property set to a certain value.
Write a script that iterates over the pages returned by the search and adds a thumbnail to each page using the setProperty method of the Asset class. You can use the JcrConstants.JCR_CONTENT_THUMBNAIL property to set the thumbnail for the page.
Run the script to add thumbnails to the pages. You can run the script on your local machine or on a server that has access to the AEM instance.
It is important to note that you will need to have the necessary permissions to use the Asset API and write scripts in order to automate this process.
Views
Likes
Replies