Day 05 - Develop AEM Components and Templates
July 04, 2020
Howdy fellow developers 👋. In this post, we will start our formal development on AEM by creating components for pages and templates for creating pages. Before we being, let’s see what are components and templates in AEM.
In the previous posts, we discussed that digital marketers use AEM to show content to the users of their websites. The content creation process in AEM is hassle free and quick. This content is configurable also. This is possible due to the components.
Components are the basic building blocks of an AEM website. They can be easily dragged and dropped on to the page. The digital marketers (or content authors) add content (which can be anything - text, image, video, tables etc.) via these components on the websites. Content authors don’t have to worry about the technicalities of the website.
It is the job of the AEM developers to convert the business requirements into a fully functional component. Once a component is developed, it can be configured to use anywhere on the website any number of times.
Any website is composed of webpages. In AEM, these webpages are created by content authors and they use components on these pages for putting content. But as you must have seen, most websites have common layout in their different webpages; only the content is different on different pages. For e.g., header, footer, navigation, sidebar etc. are same in almost every page of a website. The content in these components doesn’t usually change.
It is obviously not a good idea to create these common components on every page again and again. Wouldn’t it be great if we create this common content once and use it on every page automatically? Yes, of course 😍.
AEM templates are the blueprint for every page on the website. In simpler terms, we can create many pages based on a template and all these pages will have the same layout. We can have multiple templates also. For e.g., we can have different templates for creating product details and landing pages. This is cool, ain’t it 🤩?