Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
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.