Mayur Desai
Mayur Desai

Reputation: 121

Programmatically setting tags (cq:tags) in a required node under etc/tags

I am trying to set cq:tags under etc/tags/example/ABC But when the code runs, new tags are created under a /default/ directory:

etc/tags/default/etc/tags/example/ABC

Upvotes: 0

Views: 2185

Answers (1)

mickleroy
mickleroy

Reputation: 1008

AEM tags are always grouped into namespaces. When setting your tag, your are not specifying a namespace so AEM is using the default namespace.

You should use the following format: namespace:your/tag so in your case it would be example:ABC.

More information: https://docs.adobe.com/docs/en/cq/5-6-1/wcm/tag_admin.html#Creating Tags and Namespaces

Upvotes: 1

Related Questions