HOW TO CREATE A PAGE USING TEMPLATE IN AEM WITH JAVA?

f:id:aegissofttech:20220201195038p:plain

Do you know AEM? It is a content management tool used by Java application development India teams to generate websites, apps, and mobile platforms. In this post, the teams will build you learn about the steps to generate a page using the template in AEM.

Technology:

AEM(Adobe CQ5), stands for Adobe Experience Manager. It is a Content Management Tool that is used to create a website, mobile platforms, and apps. It is easy to manage the content and assets of your website with AEM. It is a large-scale web content management system that is currently available in Adobe Systems. The Server of AEM is platform-independent as it is based on java technology.

Usecase:

We can create a template in AEM which will be useful for creating pages for a website. A Template is used to create a page for the website and define which components can be used within the defined selected scope. A template is a hierarchy of nodes that has the same construction as the page to be created but without any real content.

There are 5 steps to creating the page:

  1. Start the AEM Server.
  2. Open crxde lite in server.
  3. Create the template.
  4. Create a page component
  5. Create a page using that template.
  6. Activate the page.

Step1: Start the AEM Server:

To start the AEM server double click on the jar file.

f:id:aegissofttech:20220201195429p:plain

Once AEM started, it look like below

f:id:aegissofttech:20220201195456p:plain

Once the server started, by default a window will open in the

f:id:aegissofttech:20220201195526p:plain

Provide the credentials,

Username: admin, password: admin

Once you successfully log in, the below screen will come up.

f:id:aegissofttech:20220201195607p:plain

Step2:  Open CRXDE lite.

Click on Tools,

If the user clicks on Add Image button, a pop-up dialog will open to select the image…

The code snippet to select the image will be below:

f:id:aegissofttech:20220201195722p:plain

If you observe user has the possibility to filter the images based on the type like jpg, .bmp, .gif, etc.

FileDialog is a framework class to deal with file-related stuff.

Step2:  How to Open CRXDE Lite

Click on Tools,

f:id:aegissofttech:20220201195812p:plain

Then click on CRXDE Lite,

f:id:aegissofttech:20220201195844p:plain

CRXDE Lite Console,   

f:id:aegissofttech:20220201195914p:plain

Step 3: Create a Template

To create a template, Right-click on the template folder and select the option create the template

f:id:aegissofttech:20220201195959p:plain

Then provide the template information like label, title, description, resourceType(mandatory),

f:id:aegissofttech:20220201200037p:plain

Step 4: Create a Page Component

To create a component, right-click on the component folder and select the create component.

Provide the component(first component) information like title, label, description(mandatory). resourceSuperType is not mandatory.

f:id:aegissofttech:20220201200200p:plain

With component, you will get a jsp file with component name first component.jsp. open the jsp file and write the script whatever you want to show it on page the

f:id:aegissofttech:20220201200350p:plain

Step 5: Create a page using the template

Open siteadmin, with urllocalhost:4502/siteadmin

f:id:aegissofttech:20220201200451p:plain

Click on new,

f:id:aegissofttech:20220201200526p:plain

Select the title first page and select the template FirstTemplate

f:id:aegissofttech:20220201200603p:plain

Step 6: Activate a page

Right-click on the page and choose the option to activate,

f:id:aegissofttech:20220201200638p:plain

You now know the basics of AEM. Hope the java application development India team has made you understand the process of creating a page using the template in AEM. Still, if you feel confused about any part of the post, ask the team.