Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Shortcut way to edit dropdown's content

Avatar

Level 2

Hi all,

 

I am trying to update the below dropdown's list. Since there are a lot of items, it takes time to add the items by using '+' icon button and remove by using '-' icon button as well. Is there any shortcut way to upload in one shot?

 

AEM_option.JPG

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 1

Hi @Snow123 ,

You can use Datatsource in this case. Create a json file with key-values required in dropdown and keep it in dam or /etc or any other preferred location. Create a datasource which will read the json file and populate the values in dropdown. At the end of the day you just have to update the json file and datasource will update the dropdown automatically. Kindly refer to the below links to create a datasource

http://www.sgaemsolutions.com/2019/01/dynamically-populate-drop-down-values.html

 

Hope this helps.

Thanks

View solution in original post

6 Replies

Avatar

Community Advisor

Hi @Snow123 

 

At the end of the day these contents are the XML files. So you can create an XML with all the options and then push it using VLT or as part of the code along with updating the filter.xml to ensure only these contents are pushed to your local instance.

 

Once these nodes are available on local instance, make a package with the filter path and then deploy it into whichver server you want.

 

Hope this helps!

Thanks!

Avatar

Community Advisor

Hi @Snow123 

 

You can add these files in your local code base under ui.content section with appropriate folder structure and then deploy the code to local. See the sample file structure below:

 

asutosh_jena_0-1630559759245.png

 

Avatar

Correct answer by
Level 1

Hi @Snow123 ,

You can use Datatsource in this case. Create a json file with key-values required in dropdown and keep it in dam or /etc or any other preferred location. Create a datasource which will read the json file and populate the values in dropdown. At the end of the day you just have to update the json file and datasource will update the dropdown automatically. Kindly refer to the below links to create a datasource

http://www.sgaemsolutions.com/2019/01/dynamically-populate-drop-down-values.html

 

Hope this helps.

Thanks

Avatar

Administrator

@burhanuddinj Good to have great AEM SME inside the AEM community. Keep assisting others. 



Kautuk Sahni