Making resourceType property configurable using a variable
Hi All,
Whenever we create a new template we define some of the properties of template like below. A new page is created using this template on the jcr:content node of that page I would see the
resourceType property as sling:resourceType="/apps/myapp/components/pages/test"
Now say later if I want to change my page component from test to test1, all my previously created page would be broken. Is there a way rather than storing a exact string I can store some variable constant which I can change any time without affecting my previously created content. Something similar to declaring a constant variable in java class, and using the constant at multiple places and whenever I want to change the value of constant I just upate at one place without impacting the places where it was used. Does JCR or Sling can do something similar to this?
<?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="Test template description"
jcr:primaryType="cq:Template"
jcr:title="Test Template"
ranking="{Long}100">
<jcr:content
jcr:primaryType="cq:PageContent"
sling:resourceType="/apps/myapp/components/pages/test"/>
</jcr:root>
Thanks!
Shehjad