Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Number Of Templates for a site

AEM_Forum
Level 10
Level 10

Hi all,

I came across a site, which has the same header and footer across all pages, with only content or body changing across different pages.

If I device only one template with one iParsys for the header, one parsys for body/content and one iParsys for Body, would this be enough?

Idea is that at the parent page, header and footer are authored once and all child pages inherit them and so the same header and footer will inherit, without the author having to author content.

For each page, we could use column controls and components to author content.

Is my understanding correct?

Then, my next question is given that most of the we sites have the same header and footer, why do we go for more than one template?

Of course, if the header and footer are different, I agree.

Appreciate your help.

Thanks,

Rama.

1 Accepted Solution
Lokesh_Shivalingaiah
Correct answer by
Community Advisor
Community Advisor

Your understanding is right. but essentially in the real time how the content is created varies.

ex: we create something like homepage template

Here, requirement would be for authors to create homepages or landing pages, carousel **Should be** part of it right below the header

In such cases, we create a template which has the carousel component embedded in it and name it as homepage template. So when authors wants to create a homepage or a landing pages for their site(s), they choose this particular template and configure the images for the carousel and etc...

similarly it all depends on what the site looks like along with business needs. 

However, given an ideal scenario 1 template should be able to achieve everything !

View solution in original post

5 Replies
Gdubz-57m2mu
Level 5
Level 5

I think the answer is really up to how much customization you want the final author to have to do. You could establish a base page that has a hardcoded (but still configurable header/footer) and then a parsys on the page itself (for columns or whatever you want) and then be done with it, but that's leaving all the work on an author to configure the layout for the page (via column components) for every. single. page.

Whereas if you defined a "left rail template" (for example), that extends your base page (meaning they get the already configured header/footer) and that has a 33% left-column and a 66% right column (again, just an example), then all your authors have to do is select a layout template and author what they want in each area.

Another benefit of separate/multiple templates, is if you have specific types of pages that you want in certain areas. For example, "Homepage Template" will always be your top page under /content/<your-project>/en and has specific configurations/properties only for that page. Or a "Product Page Template" that only allows "Product" components on it and they're preconfigured to display in a certain way... A very edge case, but just saying, you can get very specific if you want to lock down certain authoring experiences. It ultimately depends on how much you need/want to idiot-proof the authoring experience.

That's my just 2 cents, someone else may be able to provide better examples. Hope it helps!

Lokesh_Shivalingaiah
Correct answer by
Community Advisor
Community Advisor

Your understanding is right. but essentially in the real time how the content is created varies.

ex: we create something like homepage template

Here, requirement would be for authors to create homepages or landing pages, carousel **Should be** part of it right below the header

In such cases, we create a template which has the carousel component embedded in it and name it as homepage template. So when authors wants to create a homepage or a landing pages for their site(s), they choose this particular template and configure the images for the carousel and etc...

similarly it all depends on what the site looks like along with business needs. 

However, given an ideal scenario 1 template should be able to achieve everything !

AEM_Forum
Level 10
Level 10

Hi,

Thanks for your replies.

The AEM community helped me to solve my this issue, as it has always been in the past.

Thanks to these replies, I got a better understanding and a broader view of the topic in question.

I highly appreciate all your help.

Thanks,

Rama.

kautuk_sahni
Employee
Employee

Hi Rama

Your Understanding is correct here.

The concept of template is that if many pages have same structure then rather than creating all separately, mold them through a common structure which is Template in our case.

So Ideally, Template should be 1.

But in real life, there comes many problems,

1. On later stage of development we came to know that our current template is not capable of new functionality, so in that case we develop new template.

2. Business requirement is such that new template is needed.

 

Example:- 

Landing Page :- http://www.adobe.com/products/pdfprintengine.html

Sub page 1:- http://www.adobe.com/products/pdfprintengine/features.html

Sub page 2:- http://www.adobe.com/products/pdfprintengine/faq.html

 

So here in this case, Header and footer are same across the pages, but you could see business requirement is different for all the pages, so different template were used.

I hope this would help you.

 

Thanks and Regards

Kautuk Sahni

Kkkrish
Level 5
Level 5

May be you can try with the below approach keeping the Header and footer pages separated with the remaining pages and load them via cq:include in the other templates. So that you can easy way of authoring of Header and Footer and can be maintained your own site edition level header and footer separated 

https://docs.adobe.com/docs/es/aem/6-1/develop/components/boilerplates.html

Regards,

Kk