Tag Characteristics

  • Node type is cq:Tagn
  • Node name is a component of the TagID.
  • The TagID always includes a namespace.
  • The jcr:title property (the title to display in the UI) is optional.
  • The jcr:description property is optional.
  • When containing child nodes, the tag is referred to as a container tag.
  • The tag is stored in the repository below a base path called the taxonomy root node.

Because tags are simply JCR nodes, the node names must abide by the JCR naming convention.

TagID

A TagID identifies a path which resolves to a tag node in the repository.

Typically, the TagID is a shorthand TagID starting with the namespace or it can be an absolute TagID starting from the taxonomy root node.

When content is tagged, if it does not yet exist, the [cq:tags](#tagged-content-cq-tags-property) property is added to the content node and the TagID is added to the property’s String array value.

The TagID consists of a namespace followed by the local TagID. Container tags have subtags that represent a hierarchical order in the taxonomy. Subtags can be used to reference tags same as any local TagID. For example, tagging content with fruit is allowed, even if it is a container tag with subtags, such as fruit/apple and fruit/banana.

Taxonomy Root Node

The taxonomy root node is the base path for all tags in the repository. The taxonomy root node must not be a node of type cq:Tag.

In AEM, the base path is /content/cq:tags and the root node is of type cq:Folder.