When both cq:templatePath and cq:template are set on component, cq:templatePath configuration are only picked up. Is it expected behaviour?.
Details: (cq:template)
in _cq_template.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="nt:unstructured"
firstname="FirstName via cq:template"
lastname="LastName via cq:template"
>
</jcr:root>
Details: (cq:templatePath)
cq:templatePath="/apps/samplehtl/components/content/include/templatepath"
In folder of /apps/samplehtl/components/content/include
<?xml version="1.0" encoding="UTF-8"?>
jcr:primaryType="sling:Folder">
<templatepath
jcr:primaryType="nt:unstructured"
firstname="FirstName via cq:templatePath"
lastname="LastName via cq:templatePath"
>
</templatepath>
</jcr:root>
Out put is :
FirstName via cq:templatePath
LastName via cq:templatePath
In folder of /apps/samplehtl/components/content/include -- remove LastName
<?xml version="1.0" encoding="UTF-8"?>
jcr:primaryType="sling:Folder">
<templatepath
jcr:primaryType="nt:unstructured"
firstname="FirstName via cq:templatePath"
>
</templatepath>
</jcr:root>
Out put is :
FirstName via cq:templatePath
I have set missed paramter lastname in cq:template, it is not using configuration (from cq:template) for that value.It is always using cq:templatePath for all paramter.is it expected behaviour(cannot mix both cq:template and cq:templatePath)?