Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Templates vs components

Avatar

Level 2

What should a developer do when using Templates instead of Components?

1 Accepted Solution

Avatar

Correct answer by
Administrator

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

View solution in original post

3 Replies

Avatar

Employee Advisor

You have to use both templates and components.

Jörg

Avatar

Correct answer by
Administrator

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

Avatar

Level 10

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.