Check this out - // Get the resource resolver.
ResourceResolver resolver = resourceResolverFactory.getAdministrativeResourceResolver(); // Get the resource.
Resource resource = resolver.getResource(resourcePath);
// Get the Sling Model.
SlingModel model = resource.adaptTo(SlingModel.class); // G...
Hi @HN_Doug To achieve the desired nested conditions in the query, you can add a new group to the existing query with the required properties. The modified code for the querybuilder should look something like this:fulltext=searchterm
@CodeRrave818 If you have Groovy console installed, you can try below script to fetch desired records - import com.day.cq.dam.api.Asset
def damPath = "/content/dam/demo"
def assetManager = sling.getService(AssetManager.class)
def folder = assetManager.getAsse...
@sreenu539 Image Presets work like a versatile chef who can prepare a dish in different sizes, with different ingredients, and various accompaniments based on the occasion and preferences. Similarly, Image Presets dynamically deliver images in different sizes, formats, and with other properties that...
Can you remove the "group.p.or=true" parameter and add the "orderby=@jcr:score" parameter outside of the grouping block and verify
If the requirement is to convert CSV data into HTML and then into JSON, one possible approach could be the following:
Utilize the Content Fragment API to convert each row of CSV data into a separate Content Fragment.
Assemble these Content Fragments into an HTML page, Use the Content Fragment...
You can create a servlet or use a separate Service layer to pus...
Check the Opt-Out service configuration in the /config folder to ensure it is correct.
Verify that the Opt-Out service is active and running by checking the OSGi console in AEM. Look for the Opt-Out service and confirm that it is running.
Hi @vijitha098 - you can write something like - if you have list of nodes, you can create an array of it or you can read it from csv
// Array of node paths to delete
def pathsToDelete = [