Granite UI component in static template
Hi All,
Initially I like to include a rich text editor in a container within a component, but it fails to show up. So I just include a regular auto-generated text component, which is located at "mysite/components/content/text". This seems to be for all projects using maven archetype and I take for granted that it works.
Here is the component xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/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="nt:unstructured"
jcr:title="Nav Config"
sling:resourceType="cq/gui/components/authoring/dialog"
extraClientlibs="[core.wcm.components.navigation.v1.editor]"
>
<content
granite:class="cmp-navigation__editor"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<tabs
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/tabs"
maximized="{Boolean}true">
<items jcr:primaryType="nt:unstructured">
<textheading
jcr:primaryType="nt:unstructured"
id="nav-heading-text"
title="Heading & Text"
jcr:title="Heading & Text"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<heading
jcr:primaryType="nt:unstructured"
fieldLabel="Heading"
name="./heading"
sling:resourceType="granite/ui/components/foundation/form/textfield"/>
<text
jcr:primaryType="nt:unstructured"
fieldLabel="Body"
name="./text" sling:resourceType="mysite/components/content/text">
</text>
</items>
</textheading>
</items>
</tabs>
<items>
</content>
</jcr:root>
Looking at the bold text xml, the "Heading" and its field show up on the component, but not the "Body".
If I change the sling:resourceType to "mysite/components/content/separator", I can see the separator, and only this one works, others such as image, title, etc. don't.
The mysite/component/content/text/.content.xml is:
<?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:primaryType="cq:Component"
jcr:title="Text"
sling:resourceSuperType="core/wcm/components/text/v2/text"
componentGroup="Mysite.Content"/>
Can someone please help?
thanks!
-kt
