Expand my Community achievements bar.

SOLVED

How to configure page level configuration - AEM 6?

Avatar

Level 3

Hi All,

I have a store locator page, integrated with Google maps. The front-end functionality is developed in AngularJS. There are different labels that needs to be displayed in the page, which has to be authorable. The approach in my mind is to create a template called "Store Locator" which will have the JSP/Sightly template to render the page.

How do I make the labels and text on the page which is rendered through AngularJS authorable? Where do I provide the functionality for authors to edit these labels (linke 'Opening time', 'Address', 'Store facility' etc.) Also, there is filter on the page which also needs to be author editable.

Also, configuration parameters like Google table id, Google key, Google Maps URL etc needs to be configured. How can I provide/build the solution for authors to configure these parameters?

Could someone please direct me on the right direction to build the functionality.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Employee

Please have a look at the Generic List component at http://adobe-consulting-services.github.io/acs-aem-commons/features/generic-lists.html . You can create a page with this Generic List component which allows us to author a key-value list. In your code, you can do the following.

PageManager pageManager = resourceResolver.adaptTo(PageManager.class);Page listPage = pageManager.getPage("/etc/acs-commons/lists/targets");
GenericList list = listPage.adaptTo(GenericList.class);

String value = list.lookup(key); will give you the value.

When you are using sightly, you can wrap this logic in a sling model(http://sling.apache.org/documentation/bundles/models.html) or a wcmuse(http://blogs.adobe.com/experiencedelivers/experience-management/sightly-intro-part-4/)

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

Please have a look at the Generic List component at http://adobe-consulting-services.github.io/acs-aem-commons/features/generic-lists.html . You can create a page with this Generic List component which allows us to author a key-value list. In your code, you can do the following.

PageManager pageManager = resourceResolver.adaptTo(PageManager.class);Page listPage = pageManager.getPage("/etc/acs-commons/lists/targets");
GenericList list = listPage.adaptTo(GenericList.class);

String value = list.lookup(key); will give you the value.

When you are using sightly, you can wrap this logic in a sling model(http://sling.apache.org/documentation/bundles/models.html) or a wcmuse(http://blogs.adobe.com/experiencedelivers/experience-management/sightly-intro-part-4/)