5 Replies Latest reply on Jun 12, 2013 7:37 PM by todd_guerra

    Limit components available in templates


      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 everything looks great, but when I export that template and install it on another cq5 instance the component list that I've set for that template vanish.  Any idea how to get them to stick?

        • 1. Re: Limit components available in templates
          rush_pawan Level 4



          To persist your template setting in next system you have to export the template configuration of your site from /etc/designs/yoursitename (if you explore the jcr:content node you will see all the templates configured for this site)


          For example: to export template configuration of all the templates in geomertixx site you have to export /etc/designs/geometrixx


          Let me know for more information




          • 2. Re: Limit components available in templates
            Ove Lindström Level 4

            I prefer to limit the use of components in a template using allowedChildren rather than selecting them in the Design and adding them to the sidekick.


            See http://stackoverflow.com/questions/16676011/adobe-cq-components-restricting-child-componen ts

            • 3. Re: Limit components available in templates
              rush_pawan Level 4

              I think it's best suits with regions like parsys or parbase or any container component instead of a whole template. The page configuration (not content page) follows inheritence so if your page has configured with resource super type then you have to manage those relations properly.

              • 4. Re: Limit components available in templates
                orotas Level 4

                Using allowedChildren isn't going to get you what you want, unless you create a custom parsys component significantly alter it. The allowedChildren setting doesn't drive the availability of components in the sidekick, it drives the availability of components in the design dialog for the. parsys. So even if you set the allowedChildren for the template you still have to transfer the design page to any new instance, or reselect the components in in question because of the way the parsys works.

                • 5. Re: Limit components available in templates

                  Create a custom design for your site, then assign that design at the top level of your site (we usually use the en/language node for this). This setting will inherit down to your entire site (it doesn't show in the page properties, as it's an inherited property....but it's there). Then, all components selected in design mode will go to this design file instead of the default.

                  Then, you have two options:


                  1. Include the design file with your initial/test content package. --This will give the users the freedom to adjust the design as they see fit, it will only be overwritten if you reinstall the content package.


                  2. Vault it out to your project and deploy with your code. --You'd do this if you didn't want the users to be changing the design at all. NOT a good solution if your users will be using design dialogs, as those will get overwritten with each code deploy unless you happen to vault out their updated design.


                  Hope that helps.