AEM 6.5 - Setting Default Tags

Avatar

Avatar
Validate 1
Level 1
jsolano918
Level 1

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
jsolano918
Level 1

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
jsolano918
Level 1

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
Give Back
Level 4
Sanket_Kumbharkhane
Level 4

Likes

46 likes

Total Posts

50 posts

Correct reply

20 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Give Back
Level 4
Sanket_Kumbharkhane
Level 4

Likes

46 likes

Total Posts

50 posts

Correct reply

20 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Sanket_Kumbharkhane
Level 4

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
Give Back
Level 4
Sanket_Kumbharkhane
Level 4

Likes

46 likes

Total Posts

50 posts

Correct reply

20 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Give Back
Level 4
Sanket_Kumbharkhane
Level 4

Likes

46 likes

Total Posts

50 posts

Correct reply

20 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Sanket_Kumbharkhane
Level 4

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