Expand my Community achievements bar.

AEM as Cloud Service -- Pre-filter component list in page parsys or responsive grid based on logged in user

Avatar

Level 1
Given that a user is part of project-author group then the component selection window is pre-filtered by the project-component component group, once we click on the Parsys or responsive grid, please find below screenshot, once I log into author instance and open the page, to author and click on parsys to add the component , then need to see project-component group components only in the list, example screenshot I given a sample one showing general group.

Som_ChaithanyaGo_0-1713848368911.png

 

1 Reply

Avatar

Community Advisor

Hi, 

You will have to build something custom. Overall, you can create a JavaScript hook which, on the dialog loaded (or ready) event, checks the user role. Then, via JavaScript, you can select whatever group you need.

 

These resources can you help to build what I've described:

https://sadyrifat.medium.com/show-hide-aem-cq-dialog-fields-based-on-select-field-selection-a-compre... (Here you just need to update the js to instead of showing a field, you select the element in the dropdown)

https://jimfrenette.com/aem/components/dialog-coral-ui-select-cascade/ 

 

Hope this helps

 

 



Esteban Bustamante