Using the cq:template file

Using the cq:template file

Often when developing Components I find that I need to specify a default value that is set as soon as the component is dropped on the page. Today I want to show an easy and quick way to do this using cq:template.

1) In CRXDE navigate to the component that you need the default value for.

2) On the same level as the component dialog create a node titled "cq:template" of type "nt:unstructured". Your component should now look like this.

3)Now you can either add your values as properties using the CRXDE interface or you can vault your changes out into your favorite IDE and manually write the XML on your own. In this case I just used CRXDE since it is the quickest.

4) And that should do it. Feel free to now test your component!

Share this post

0 Comments

comments powered by Disqus