AEM 6.5 - Setting Default Tags

Avatar

Avatar

jsolano918

Avatar

jsolano918

jsolano918

29-01-2021

Note: I'm a front-end developer and not a java developer. If this needs to be handled in the backend, please let me know.

I'm working on a project that allows filterable tags. There are some tags I'd like to have populated by default, without the content creator having to find and select them. Is there a way to do that in the .context.xml dialog? Attached is my current code and what it looks like in the dialog box.

 

Use case: I have 2 tags selected. Is there a way to have them populated by default without having to click the checkbox and find them?

 

tags in xmltags in xmlcurrent tags in dialogcurrent tags in dialog

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Sanket_Kumbharkhane

Avatar

Sanket_Kumbharkhane

Sanket_Kumbharkhane

31-01-2021

Yes, you can use cq:template node in the below component to populate default values.

 

cq:template has the type nt:unstructured, it allows you to define a complex node with a set of properties and children.

It's a node you create as a child of your component definition. This content will be used as default values whenever you drop a new instance of the component from the sidekick.

 

Answers (1)

Answers (1)

Avatar

Avatar

Sanket_Kumbharkhane

Avatar

Sanket_Kumbharkhane

Sanket_Kumbharkhane

01-02-2021

Hi @jsolano918 ,

 

Yes, I have tested it with we-retail tags and default title component by adding one more field of "tag".

I could not attach the package here but find the below screenshot.

 

Screenshot 2021-02-02 at 11.31.42 AM.pngScreenshot 2021-02-02 at 11.31.30 AM.png