Expand my Community achievements bar.

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

Content Fragment Node Type

Avatar

Level 2

What is the exact node type that must be used when defining a content fragment model?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @OmarKh3,

dam:Asset with a child node of type nt:data under jcr:content/data/master is used to store the content fragment, but the model itself must be of type nt:unstructured with cq:model mixin.


Santosh Sai

AEM BlogsLinkedIn


View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @OmarKh3,

dam:Asset with a child node of type nt:data under jcr:content/data/master is used to store the content fragment, but the model itself must be of type nt:unstructured with cq:model mixin.


Santosh Sai

AEM BlogsLinkedIn


Avatar

Level 6

Hi @OmarKh3 ,

 

Whenever  a content fragment model created, it will get created with jcr:primaryType="cq:Template"

 

Please find below sample content fragment model 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" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:primaryType="cq:Template"
    allowedPaths="[/content/entities(/.*)?]"
    ranking="{Long}100">
    <jcr:content
        cq:lastModified="{Date}2025-07-15T19:44:29.080+05:30"
        cq:lastModifiedBy="admin"
        cq:scaffolding="/conf/we-retail/settings/dam/cfm/models/document/jcr:content/model"
        cq:templateType="/libs/settings/dam/cfm/model-types/fragment"
        jcr:primaryType="cq:PageContent"
        jcr:title="Document"
        sling:resourceSuperType="dam/cfm/models/console/components/data/entity"
        sling:resourceType="dam/cfm/models/console/components/data/entity/default"
        status="enabled">
        <metadata jcr:primaryType="nt:unstructured"/>
        <model
            cq:targetPath="/content/entities"
            jcr:primaryType="cq:PageContent"
            sling:resourceType="wcm/scaffolding/components/scaffolding"
            dataTypesConfig="/mnt/overlay/settings/dam/cfm/models/formbuilderconfig/datatypes"
            maxGeneratedOrder="20">
            <cq:dialog
                jcr:primaryType="nt:unstructured"
                sling:resourceType="cq/gui/components/authoring/dialog">
                <content
                    jcr:primaryType="nt:unstructured"
                    sling:resourceType="granite/ui/components/coral/foundation/container">
                    <items jcr:primaryType="nt:unstructured"/>
                </content>
            </cq:dialog>
        </model>
    </jcr:content>
</jcr:root>

 

 

Whenever you want create a content fragment using existing model, then content fragment will get created with jcr:primaryType="dam:Asset".

 

Thanks

Ramesh