Expand my Community achievements bar.

SOLVED

Same Editable Template different layout

Avatar

Level 4

I hv requirements like using the same template I need to create one page but the page should not contain some buttons which are coming from the template.

Please help 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @djohn98390536 

 

Please try following:

1. Initial Layout to set up any initial content/configs/text to button component. Which would be added to all the pages created from the template. Authors can later alter the settings on specific pages if needed

2. Unlock the component on template: This will allow the authors to delete the component on page, if needed


Aanchal Sikka

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hello @djohn98390536 

 

Please try following:

1. Initial Layout to set up any initial content/configs/text to button component. Which would be added to all the pages created from the template. Authors can later alter the settings on specific pages if needed

2. Unlock the component on template: This will allow the authors to delete the component on page, if needed


Aanchal Sikka

Avatar

Employee Advisor

Hi @djohn98390536 ,

 

Editable templates provide a placeholder for the master authors to define components, policies, and initial authored content.

 

What you are looking for is possible at the component level, a check either at the front-end/backend can be provided to show/hide the button. you could get the template information within your sling model.

 

After that, you can make use of Page API to retrieve template information associated with the page, which would help you write conditions.

https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/wcm/api/Pa... 

 

Hope that helps!

 

Regards,

Nitesh

Avatar

Level 4

Hi @nitesh_kumar template level means policy ,structure,and initial layout i can not change anything as it will impact other pages. I m asking any suggestion if i hide the buttons in page level will it impact going forward bcoz i m going to reuse the same place holder to show some other content?