Limiting allowed components in a template in cq5

后端 未结 2 1192
一向
一向 2020-12-11 10:07

I have a template that I want to limit to only using a certain subset of components. I\'ve created the template, set the components I want to use in design mode and everyth

相关标签:
2条回答
  • 2020-12-11 10:29

    The above answer is correct, but if you need more info, as part of the template implementation, you can define the list of components that will be rendered in the sidekick for your template by defining the following property.

    components="[/libs/foundation/components/text,/libs/foundation/components/textimage]">
    

    This will sit under the following node (xml format here)

    <TEMPLATENAME jcr:primaryType="nt:unstructured">
        <content
                jcr:lastModified="{Date}2014-04-11T13:04:48.855+10:00"
                jcr:lastModifiedBy="admin"
                jcr:primaryType="nt:unstructured"
                sling:resourceType="/libs/foundation/components/parsys"
                components="[/libs/foundation/components/text,/libs/foundation/components/textimage]">
            </content>
    </TEMPLATENAME>
    

    As long as you take this with your project to another instance, you'll keep the settings.

    always take /etc/designs/projectDesignName directory with you

    0 讨论(0)
  • 2020-12-11 10:33

    The component list is saved in your design page. A design page is a page of a "Design Page" template. You should create one for each site / project, and associate it with your page (or page's parent, or page parent's parent) using the page properties: Advanced -> Design, and then export alongside your template.

    0 讨论(0)
提交回复
热议问题