can we create a dialog at the template level ? | Community
Skip to main content
nagalaxmit28016
Level 2
March 13, 2018

can we create a dialog at the template level ?

  • March 13, 2018
  • 2 replies
  • 6830 views

Hi,

Here is my requirement like I have a fixed header and footer for the entire website except the home page. So I am designing it like,  I have created a page component where I am adding header, footer and a parsys for body. But How can I make sure that I will author only in a single page that header or footer authored content should come to all the pages which were created using that template ?. Please suggest me a way to acheive it. and can we create a dialog on the page component if so how do we have to author?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

smacdonald2008
Level 10
March 13, 2018

If you see most AEM artilces like this one:

Adobe Experience Manager Help | Creating your First Adobe Experience Manager 6.3 website

Headers and Foorter are just a component that is pulled into the site.

nagalaxmit28016
Level 2
March 14, 2018

smacdonald2008​, I have gone thorugh the article but what I found is, they are using the static content in the header and footer these are not authorable components. But for my case, I have an authorable header and footer and I want to author them at a single place and it should come to all the pages whichever I create for that site without any authoring effort. How do I have to achieve this. I want to add these headers and footer at the template level, when ever I create a page with that template these header and footer should come.

BrijeshYadav
Level 5
March 14, 2018

To make them authorable, create a dialog for them. That would be the best way to achieve your use case of an authorable header/footer. Since they are 2 separate componests, create  2 dialogs.


As smacdonald2008​ said you should create a dialog for header and footer component in order to make it author-able

and for this requirement " I want to author them at a single place and it should come to all the pages whichever I create for that site without any authoring effort"

You can can use iparsys to include header and footer component which enable it to get inherited to all children pages.
Read here for How to Create a Fully Featured Internet Website https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/website.html

/Brijesh

Level 2
June 26, 2019

I hope this helps.

You Can store your header and footer under EN page.( Under your root page, if don't have it )  I am using We retail site for this example.

<sly data-sly-resource="${'/content/we-retail/us/en/jcr:content/header' @resourceType='your header'}"></sly>

So where ever you author it in the site, all the pages will contain the same data.

When ever u create a new page the header will come with the pre-authored content.