Templates vs components | Community
Skip to main content
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 kautuk_sahni

A Template is used to create a Page and defines which components can be used within the selected scope. A template is a hierarchy of nodes that have the same structure as the page to be created but without any actual content. Templates are built up of Components;

When creating a page you must select a template, which will be used as the basis for creating the new page. The template defines the structure of the resultant page, any initial content, and the components that can be used.

So as mentioned above, we need to have both.

Documentation:- Templates and Components

~kautuk

3 replies

Ratna_Kumar
New Participant
September 18, 2017

Hi,

//Adding to Kautuk.

Also see this How to create a website in AEM: Create a Fully-Featured Website (JSP) so that you will have clear idea of what are templates and components.

Hope this helps!!

Regards,

Ratna.

kautuk_sahni
kautuk_sahniAccepted solution
Employee
September 18, 2017

A Template is used to create a Page and defines which components can be used within the selected scope. A template is a hierarchy of nodes that have the same structure as the page to be created but without any actual content. Templates are built up of Components;

When creating a page you must select a template, which will be used as the basis for creating the new page. The template defines the structure of the resultant page, any initial content, and the components that can be used.

So as mentioned above, we need to have both.

Documentation:- Templates and Components

~kautuk

Kautuk Sahni
joerghoh
Employee
September 17, 2017

You have to use both templates and components.

Jörg