0% found this document useful (0 votes)
60 views

Create Template

The document outlines the steps to create a two-column template in AEM, including creating the template structure folder in the component directory, creating the template node using CRXDE Lite, defining the template structure using HTL, testing the template by previewing it, and deploying the template to the publish environment using the AEM Package Manager.

Uploaded by

Biprotim sen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

Create Template

The document outlines the steps to create a two-column template in AEM, including creating the template structure folder in the component directory, creating the template node using CRXDE Lite, defining the template structure using HTL, testing the template by previewing it, and deploying the template to the publish environment using the AEM Package Manager.

Uploaded by

Biprotim sen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Create the template structure:

In the AEM component directory, you can create a new folder to store the template
code. For example, let's say you want to create a "Two-Column" template. The folder
structure would look like this:

/apps /myproject /templates /two-column

In this example, "myproject" is the name of your AEM project and "two-column" is the
name of the template. This folder will store all the files associated with the
"Two-Column" template, including the template logic and design files.

2. Create the template node:

To create the template node in AEM, you can use the CRXDE Lite tool. Here's an
example of how to create the template node for the "Two-Column" template:

1. Open CRXDE Lite.


2. Navigate to "/apps/myproject/templates".
3. Right-click on the "templates" folder and select "Create > Template".
4. Enter "two-column" as the name of the template and click "OK".
5. The new template node will be created under
"/apps/myproject/templates/two-column".
6. Define the template structure:

To define the template structure in AEM, you can use HTL to write the HTML code that
will be used to render the template. Here's an example of the HTML code for a
two-column template:

<div class="two-column-template">

<div class="left-column">

<!-- Insert components here -->


</div>

<div class="right-column">

<!-- Insert components here -->

</div>

</div>

This code defines the structure of the two-column template, with two columns for
inserting components.

4. Test the template:

To test the template in AEM, you can preview it in the author environment. Here's an
example of how to preview the template:

1. Open the "two-column" template node in CRXDE Lite.


2. Right-click on the template node and select "Preview".
3. The template will be displayed in a new browser tab and you can check if it has
the desired structure and layout.
4. Deploy the template:

To deploy the template in AEM, you can use the AEM Package Manager. Here's an
example of how to deploy the template:

1. In CRXDE Lite, navigate to "/apps/myproject/templates/two-column".


2. Right-click on the "two-column" folder and select "Create Package > AEM
Package".
3. Enter a name for the package and select the "two-column" folder as the content
for the package.
4. Click "Create" to create the package.
5. Use the AEM Package Manager to install the package on the publish
environment.

This will deploy the "Two-Column" template to the publish environment, making it
available for use in creating pages.

You might also like