Expand my Community achievements bar.

Editable templates with a nested structure

Avatar

Level 7

Hi,

 

We are trying to use editable templates to represent a structure similar to the following:

 

Container A

    Container B

        Container C

    Container B * 

        Container C *

 

At the different levels in the hierarchy we want. to set a policy to allow a particular set of components consistently. For example:

 

* At container A level just a container is allowed

* At container B level, a container and breadcrumb is allowed

* At container C level, the carousel is allowed

 

It is important to note (and where our problem lies) that the number of Container B and Container C items is flexible, there could be be number of these containers.

The policies work as expected until we get to the second instance of Container B marked with an asterisk. For this component (and container C below it) we see that the policy of the root container (Container A) is applied.

 

Note that this is a dummy example so that it can be shown in the WKND project to not detract from the core problem, in our actual project these container components inherit from the container resource type but are actually labelled as things such as: body, section, arrange (for configuring column and row layout), tile etc.

We want the ability to nest the components and configure policies so that we can configure a hierarchy of for example:

 

Body (container)

    Section (container)

        Arrange (container)

           Tile

    Section (container)

        Arrange (container)

           Tile

 

Footer (container)

    Footer Section

        Arrange (container)

           List

    Footer Section

        Arrange (container)

           List

 

Note from this hierarchy that there are a) N number of sections b) the Arrange within the body -> section allows for different components to the footer -> arrange.

 

To configure the first example on your own instance using the WKND project here are the steps to reproduce:

 

* Install the WKND project if you project if you do not have it already https://github.com/adobe/aem-guides-wknd/releases/download/aem-guides-wknd-1.1.0/aem-guides-wknd.all...

* Edit the Content Page template by going to - http://localhost:4502/editor.html/conf/wknd/settings/wcm/templates/content-page-template/structure.h...

* Remove all the items from the Structure view apart from the container in the centre, which will be used as our "Container A"

 

* Select Container A and configure a policy to allow only the following components: WKND.Content -> Container. Call this policy Container A

* Refresh the page to load the new policy

 

* Select container A and select the padlock icon and choose to lock the container

 

* Insert a container as a child of Container A (Container B)

* Select Container B and configure a policy to allow only the following components: WKND.Content -> Breadcrumb and Container. Call this policy Container B

* Refresh the page to load the new policy

 

* Insert a container as a child of Container B (Container C)

* Select Container C and configure a policy to allow only the following components: WKND.Content -> Carousel. Call this policy Container C

* Refresh the page to load the new policy

 

* Unlock Container A

 

 

* Create a new page using this modified template

* Note that you have the options available as expected to add a container under container A, add a breadcrumb or container under container B or add a carousel under container C (all good so far).

 

* Now add a new container at the same level as container B (lets call it container B2)

* Check the components that can be added under container B2 and you will see that Container B policy is not applied instead container A's policy is used.

 

Perhaps this is because of the node name differences when there are tow of the same component at the same level e.g.

container

container_123456

 

Is it possible to configure the kind of hierarchy I describe above with editable templates?

 

 

 

Note - This seems to be a similar issue here but it didn't get a definitive answer:

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/content-policy-delegation-...

 

Thanks,

James

 

 

 

 

 

 

 

 

 

 

 

 

 

 

    

 

 

 

 

 

 

 

 

 

2 Replies

Avatar

Community Advisor

Hi,

Could you please tell us the resourcetype of container components? Do all have the same type or different?

But it is possible to restrict allowed components within containers.

 

 



Arun Patidar

Avatar

Level 7

Hi Arun,

 

Thanks for your quick reply!

It might not be obvious from the question but it kind of doesn't matter. If a container of type X is repeated at the same level then the policy set for instance 1 of the container works, for instance two it does not.

 

Thsbks,

Janes