내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

TagManager doesn't find components tagged

Avatar

Level 3

Hi all,

I would like to tag components trough the cq:tags property in order to search for them quickly. However, the TagManager -> tagManager.find(tag.getTagID(); can't find them.

I believe it is related with the cq:Taggable mixin. Could it be applied to a cq:Component node type?

 

Regards,

Salvador,

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 7

That precisely is the reason. for a node to come up as reference in tagManager.find method, it needs to have cq:Taggable mixin. cq:pageContent type node by default has this mixin and hence Page node turns up automatically in .find API call.

You can enhance the nodeType definition on your server by modifying the file nodetypes.cnd

You can push this file as your code package from following location:

/src/main/content/META-INF/vault/nodetypes.cnd

Please refer to below link on how you can modify nodetypes.cnd file and add extensions to existing nodetypes.

https://jackrabbit.apache.org/jcr/node-type-notation.html

http://www.tothenew.com/blog/custom-node-type-in-aem/

 

Basically you need to extend cq:Component node type and make it cq:Taggable mixin default applied on it.

Try extending it on your local first and then on any environment, because if you don't get it right, then it can cause issues in your repository.

Please Note - Doing so will have performance implications on your server, so do this only if it is critically needed, or else you can always resort to using X-PATH/SQL2 in finding the tagged component nodes.

- Runal

원본 게시물의 솔루션 보기

2 답변 개

Avatar

Level 10

Take a look at this tag example. 

https://helpx.adobe.com/experience-manager/using/tagmanager-api-htl.html

Tags are typically applied to pages - i have not personally tried on other content pieces. 

Avatar

정확한 답변 작성자:
Level 7

That precisely is the reason. for a node to come up as reference in tagManager.find method, it needs to have cq:Taggable mixin. cq:pageContent type node by default has this mixin and hence Page node turns up automatically in .find API call.

You can enhance the nodeType definition on your server by modifying the file nodetypes.cnd

You can push this file as your code package from following location:

/src/main/content/META-INF/vault/nodetypes.cnd

Please refer to below link on how you can modify nodetypes.cnd file and add extensions to existing nodetypes.

https://jackrabbit.apache.org/jcr/node-type-notation.html

http://www.tothenew.com/blog/custom-node-type-in-aem/

 

Basically you need to extend cq:Component node type and make it cq:Taggable mixin default applied on it.

Try extending it on your local first and then on any environment, because if you don't get it right, then it can cause issues in your repository.

Please Note - Doing so will have performance implications on your server, so do this only if it is critically needed, or else you can always resort to using X-PATH/SQL2 in finding the tagged component nodes.

- Runal