Same Editable Template different layout | Community
Skip to main content
djohn98390536
Level 4
July 20, 2023
Solved

Same Editable Template different layout

  • July 20, 2023
  • 2 replies
  • 831 views

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 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

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

2 replies

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
July 20, 2023

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
nitesh_kumar-1
Adobe Employee
Adobe Employee
July 20, 2023

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/Page.html#getTemplate-- 

 

Hope that helps!

 

Regards,

Nitesh

djohn98390536
Level 4
July 20, 2023

Hi @nitesh_kumar-1 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?