How to add CQ Tags from the UI.Content | Community
Skip to main content
New Participant
July 27, 2022
Solved

How to add CQ Tags from the UI.Content

  • July 27, 2022
  • 1 reply
  • 1612 views

I'm trying to import a cq:tag name space into /content/_cq_tags, from my ui.content folder, but whenever it is installed into AEM, it turns into a folder, why is this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

@supportmember, the filter configuration is not everything. You need a proper .content.xml in you project.

Could you please share a screen shot (similar to the one I have shared) that will present full structure including all folders and files from your project level. Also please share what is inside .content.xml file that represents namespace node on your project level that is incorrectly imported.

1 reply

lukasz-m
New Participant
July 27, 2022

Hi @supportmember,

I was able to reproduce behavior you have described. In general it seems that you do not have proper .content.xml in your package/project that will provide information about tag namespace. So by default folder will be created.

To solve the issue you need to have appropriate .contnet.xml file for each namespace or tag, and it has to be included in your crx package.

Base on what is inside .content.xml AEM is aware what structure should be created during package installation, what node types should be used, and what properties should be set.

Here is working example of structure on project level - I have test namespace under /content/_cq_tags in my ui.content folder

Hers is a sample xml code from above screen, that can be included in .content.xml

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
          jcr:description="Custom namespace desc"
          jcr:primaryType="cq:Tag"
          jcr:title="Custom namespace title"
          sling:resourceType="cq/tagging/components/tag">
</jcr:root>

Please also remember to check your filter setup. In my example I have used following filter for tags.

<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
    <filter root="/content/cq:tags" mode="merge"/>
</workspaceFilter> 

 

New Participant
July 27, 2022

thanks for the feedback, but

This does not work, because it imports the package into a folder, into the crx/de. 

 

<filter root="/content/cq:tags/mybrand" mode="merge"/>

This is what I have,  

lukasz-m
lukasz-mAccepted solution
New Participant
July 28, 2022

@supportmember, the filter configuration is not everything. You need a proper .content.xml in you project.

Could you please share a screen shot (similar to the one I have shared) that will present full structure including all folders and files from your project level. Also please share what is inside .content.xml file that represents namespace node on your project level that is incorrectly imported.