Expand my Community achievements bar.

SOLVED

AEM 6.3 clientlibs : make foundation-ui adapter's property value configurable rather than hardcode in clientlibs

Avatar

Level 8

Hi ,

My custom clientlib file is something similar to Experiencing Adobe Experience Manager - Day CQ: AEM 6 SP2 - Touch UI Extend Site Admin Page Properti...

In this article, the pop-up/confirmation dialog has two properties :

id: "CANCEL",

text: "CANCEL",

and

id: "SUBMIT",

text: "SUBMIT",

We do not want this[basically referring to CANCEL and SUBMIT here] to be hardcoded, but to be fetched from say a config file or something of that sort.

Any thoughts on how this can be done.

Any pointers/code snippet/reference articles will be helpful.

1 Accepted Solution

Avatar

Correct answer by
Level 10

From the same JS

1. Make a ajax to jcr node where those configurable properties will be stored

2. Replace the values hardcoded in that script

Remember, executing script code to show the pop (submit/cancel) should be callback of the result from step #1.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

From the same JS

1. Make a ajax to jcr node where those configurable properties will be stored

2. Replace the values hardcoded in that script

Remember, executing script code to show the pop (submit/cancel) should be callback of the result from step #1.

Avatar

Level 8

Hi,

Thank you for your reply.

To make this configurable, we made use of i18n to place the values and fetch from it by the below.

Granite.I18n.get("property"); in the js.