AEM Cloud Service - Render condition to show Reprocess Assets button for configured group | AEM Community Blog Seeding | Community
Skip to main content
kautuk_sahni
Employee
May 10, 2021

AEM Cloud Service - Render condition to show Reprocess Assets button for configured group | AEM Community Blog Seeding

  • May 10, 2021
  • 1 reply
  • 1203 views

BlogImage.jpg

AEM Cloud Service - Render condition to show Reprocess Assets button for configured group by Sreekanth Choudry Nalabotu

Abstract

Solution

1) Create a custom widget /apps/eaem-cs-smart-crop-rc/dam-tools/userpicker/userpicker.jsp to read the values from config resource /conf/global/settings/dam/eaem-dam-config. It extends otb user picker /libs/granite/ui/components/coral/foundation/form/userpicker using a sling:include, for setting the granite.ui.form.contentpath attribute to read values from config location /conf/global/settings/dam/eaem-dam-config

<%@include file="/libs/granite/ui/global.jsp" %>

<%@page session="false"%>

<%
String CONFIG_RES = "/conf/global/settings/dam/eaem-dam-config";

request.setAttribute("granite.ui.form.contentpath", CONFIG_RES);
%>

"/>


2) Create the tools navigation /apps/cq/core/content/nav/tools/eaem-dam-tools/eaem-dam-config.






3) Create the configuration page /apps/eaem-cs-smart-crop-rc/dam-tools/eaem-dam-config for selecting the group name and save to /conf/global/settings/dam/eaem-dam-config@processAssetsGroup accessed using Tools > Experience AEM > EAEM Configuration or https://author-pxxxxx-exxxxx.adobeaemcloud.com/apps/eaem-cs-restrict-assets-size/dam-tools/eaem-dam-config.html/conf/global/settings/dam/eaem-dam-config

















































4) Add a render condition script /apps/eaem-cs-smart-crop-rc/smart-crops-render-condition/smart-crops-render-condition.jsp checking if the user is member of group set in /conf/global/settings/dam/eaem-dam-config@processAssetsGroup.

Read Full Blog

AEM Cloud Service - Render condition to show Reprocess Assets button for configured group

Q&A

Please use this thread to ask the related questions.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Rohan_Garg
New Participant
July 5, 2023

Can't we use OTB render condition to control the menu option visibility?

/libs/cq/gui/components/siteadmin/admin/listview/columns/grouprendercondition