Restrict the components in AEM 5.6.1

后端 未结 3 1361
时光取名叫无心
时光取名叫无心 2020-12-06 02:32

How can I restrict the components in AEM 5.6.1 that can be used in a particular parsys of a template with out selecting them in the design mode?

3条回答
  •  盖世英雄少女心
    2020-12-06 02:44

    In CRXDE, under /etc/designs/[your design]/jcr:content, you can define nodes to represent each of your templates & their paragraphs & list the allowed components for each.

    The format is a node for each template that contains a node for each parsys (both [nt:unstructured]).

    The parsys node then has a sling:resourceType defined of foundation/components/parsys and a components property of String[]. For an example, check out how the Geometrixx one is defined: http://localhost:4502/crx/de/index.jsp#/etc/designs/geometrixx/jcr%3Acontent/contentpage/par

    You could then extract this via VLT, which gets stored as a .content.xml file under etc/designs/[your design].

    Alternatively, you can create that file by hand, too. E.g. the following would define 'Your Design' as allowing default "text" and "image" components on the "yourParsys" paragraph of "yourTemplate".

    
        
            
                
            
         
    
    

    This allows you to move this file across instances (e.g when deploying a CRX package) so that you don't have to configure environments individually & which components are allowed where can also be managed by version control.

提交回复
热议问题