Enabling components in the Components tab

In the last session, we have added a space in the template that allows us to drag and drop a component to the web page. One of the shortcomings in the template was that it didn’t
have any components in the Components tab. In this session, we will add components to the Components tab.

  1. Open the web page we created.
  2. Click the Page Information icon and select Classic UI.
    The same page appears with a different look and feel.
    It’s called Classic UI. Classic UI is specifically designed for viewing in Desktops.
    (The UI you were using is designed for Touch Optimized devices.)
  3. From the sidekick, click the Design tab.
  4. Click Edit from the Design of Content.
    edit-design-par
    You can see various categories of components.
    select-component-category
  5. Select a category or go inside the category and select specific components.
  6. Open the page again and go to the Components tab.
    You will see all the components listed.
  7. Drag and drop the component to the web page and start editing.

Happy editing.

In the next session, we will update the template with a design.

Adding the Parsys component to template

In this session, let us try to modify the template we created earlier. We will add a parsys component in the template to provide a space in the web page to drag and drop components.

Let us once again see how a page created using this template looks like.

  1. Log into to SiteAdmin. (http://localhost:4502/siteadmin)
  2. Double-click AEM Company page that you created. (If you have not created it, download the package that I provided in the previous session. And, then install it.)

The page appears with the text we entered in the template. There are three issues associated with this page:

  •  There is no place where you can drag and drop a component. (If you are not really able to make out that, I suggest you to visit my previous post. You could also open one of the pages from the sample websites to compare.)
  • The Component tab doesn’t display any components.
  • The template is not associated with any design. (Our page is really blank. It doesn’t have anything like header, footer, and so on.)

Let us solve these issues one-by-one. First, we will provide a place in the web page to add components.

  1. Go to CRXDE Lite. (http://localhost:4504/crx/de)
  2. Open the template’s rendering script. (/apps/aem-company/components/homepage/body.html)
  3. Add the following code:
    <div data-sly-resource=”${‘content’ @ resourceType=’wcm/foundation/components/parsys’}”></div>

This is a Sightly code. data-sly-resource is a tag to specify the component that you need to add to the page. It has a resourceType parameter that points to a parsys component. You would had noticed it points to a location where we saw a page component, which we inherited while creating a template. Note that this is the standard procedure to provide a location to add components in a template.

Now refresh the web page. Notice that now it provides you with a space where you can add components.

parsys

I have provided a new package in GitHub. (TemplateWithParsys.zip) Download and use it if you want to.

Summary: Use the parsys component to add space for addition or deletion of components in a web page. You don’t need to create a parsys component. Always reuse the component that exists.

Summary – Creating templates and using packages

In this session, let us summarize what we learned in the previous session: Create the  first template. We created a template in three steps:

  • Step 1: Created the company folder inside apps. Created a folder for components and templates.
  • Step 2: Created a template inside the templates folder. Provided allowed paths as /content(/.*)?. And, we provided resourseType as aem-company/components/homepage. This was a component that didn’t exist at that time.
    resourceType
  • Step 3: We created a homepage component inside the components folder. This is the component that has the rendering script which decides the layout of the page. We named it as homepage, so that we can identify it as a page component (a component that decides the layout of the page, not the component you drag and drop to a web page.) We specified resourceSuperType of this component as wcm/foundation/components/page. Our intention was to inherit the page component. This is a must to get various functionalities in the webpage that authors create. We renamed the default script of component as body.html, so that we override only body.html that existed in wcm/foundation/components/page. Rest of the scripts we inherited.
    resourceSuperType1

This is the standard process to create  a template. I have created a package (FirstTemplate.zip) and shared in my GutHub account. Feel free to download, install, and experiment with it. You need to log into PackageManager to install a package. Packages in AEM helps you to share codes across AEM instances.

  1. Download the package from GitHub. Use FirstTemplate.zip.
  2. Log into PackageManager as admin/admin. (http://localhost:4502/crx/packmgr/index.jsp)
  3. Select Upload Package.
  4. Locate the package you downloaded. Click OK.
  5. All we have done in the previous session will be replicated to your AEM instance.

Create the first AEM template

In the last session, we have explored templates using CRXDE Lite. If you have not yet gone through the last session, go through it.  In this session, we will create a sample template using CRXDE Lite. Let us first get into the shoes of authors to see where exactly authors use a template in their content creation workflow.

  1. Open SiteAdmin. http://localhost:4502/siteadmin
  2. Log in with admin/admin credentials.
  3. In the left pane, go to Geometrixx Demo Site > English.
  4. From the right pane, select New > New Page.
    You see the Title and Name text boxes. (Title appears in the web page and Name becomes the URL.

What you see underneath, namely Geometrixx Content Page, Geometrixx Home Page, Geometrixx Form, are templates. They define the layout of your page.
In that sense, choosing the right template is a fundamental part of content creation.

  1. Now log into CRXDE Lite.
  2. Go to the Apps folder. We have seen earlier that apps is the folder where we create templates and components.
  3. Inside apps, create a new folder.
  4. Right-click apps and select Create Folder.
  5. Type aem-company. (This is our sample company.)
  6. After creating the company, click Save All to save the company. (Whenever you create a node, folder, or property, you need to save explicitly in CRXDE Lite.)
  7. In the similar way, inside aem-company, create two more folders: components and templates.

Now log into CRXDE Lite and create the first template.

  1. Now, right-click templates and select Create Template.
  2. Enter the following details:
  • Label: homepage
  • Title: AEM Company Home Page
  • Description: AEM Company’s Home Page Template
  • Recourse Type: aem-company/components/homepage
    This is the sling:resourseType property. We have seen that, it points to the rendering script. Right now, we have pointed it to a component that doesn’t exit. We will create that script shortly.
  • Ranking: You could leave it for the time being. It represents the order in which templates should appear.
  1. Click Next and enter Allowed Paths as /content(/.*)?. Means the template will apear in the content folder where all pages exist.
  2. Click Next till you see the Finish button.
    (We will learn about these properties at a later stage.)

Now, let us create the rendering script. We create the rendering script as a part of the component. We have already seen that, a component displays a specific information in a specific format. In this case, the component that we are going create, provides the layout of the page. It’s not a component that you can drag and drop to a page. We will name the component as homepage, so that we can identify it as a page component – or a component provides the layout of a page.

  1. Right-click the components folder and select Create > Create Component.
  2. Enter the following details.
  • Label: homepage
  •  Title: AEM Company Home Page Component
  • Description: AEM Company’s Home Page Component
  • ResourceSuperType: wcm/foundation/components/pageThis property decides the component from where you want to inherit properties that decide your page’s behavior.
    You have seen that the pages authors create have a sidekick, assets tab, and so on. We have pointed this to a page component that exists.
    Group: AEM Company

Note that, homepage component is created. It also adds a default rendering script: homepage.jsp. I have mentioned earlier that we used to create components using JSPs before. That’s the reason for the JSP extension. In this session, we will create the template using Sightly, because it’s HTML and easy to use.

Just rename the homepage.jsp to body.html. This is a very important step. The SuperType property points to wcm/foundation/components/page. Though we have not explicitly mentioned, this component exists in the libs folder. Let us locate it. Navigate to libs > wcm > foundation > components > page.

By providing this as the SuperType, we are inheriting the scripts the component has. Go to the page.html which is the rendering script. This script includes two pages: head.html and body.html. By renaming the homepage component’s rendering script’s name to body.html, we are overwriting the body.html. At the same time, we will inherit head.html. (I have explained in the simplest possible way. Let us have a detailed discussion about it later.)

Open the aem-company’s body.html and add some text. Now, go to siteadmin, create a new page. You will see the template you created. Create a page – AEM Company. Open the page and you will see the text you entered. We will modify the template further in the coming sessions.

Introduction to AEM developers

In this post, we will see the very basic responsibilities of developers. Developers create templates and components.

Let us first take a recap: a template defines the layout of a web page. Authors select a specific template before they create a page. A component allows authors to display a specific information in a certain format. For example, a bulleted list is a component. An image is a component. We have seen that you can drag and drop an image to an Image component and it will get displayed in the page.

Authors use SiteAdmin as a tool to create web pages. Similarly, there is a web console that developers use a lot – CRXDE Lite. In one of the previous posts, I have mentioned that the data in AEM is saved as Tar files. AEM uses Apache Oak for saving the data. These data is saved as nodes and properties. CRXDE Lite provides you with an interface where you can see these nodes and properties. It allows you to create and update the nodes and properties.

Let us start our exploration on CRXDE Lite: http://localhost:4502/crx/de
Log in as admin and admin as the credentials.

Let us first examine the web page that you created in the previous session. You created a web page – MyNewPage. In the left pane, move to the Content folder. Then navigate Geomtrixx > en.
You can see the web page you created there. Select the page and then select the jcr:content node. The properties associated with the node gets displayed in the right pane.
You can see a cq:template proptery which provides the location of the template you used. /apps/geometrixx/templates/contentpage
Scroll down to see the jcr:title property – the title of your page. Now select the par node. It represents a node inside which you can add other components. Inside this node, you will see the Text component you added.

In short, the pages an author creates goes to the Content folder. Normally, it’s created through SiteAdmin. Developers won’t play around with these pages.

Developers create templates and components. Where are they hidden? Go to the apps folder. This is the folder where you create templates and components associated with your project. Then go to Geometrixx. You will see various folders: components, config, install, src, and templates. We will learn more about components and templates in this session. Go inside the template folder. You will see all the templates associated Geometrixx site. These were the templates you saw while you were creating a new web page. Select the contentpage node – The template you used for creating a new page. Note that the jcr:primaryType property is cq:Template. It also got a Tile and Description properties. Now select jcr:content property. It has a sling:resourceType property. It points to geometrixx/components/contentpage.  It means that the node pointed, basically a script, provides the layout to render the content.

Let us see how this script looks like. Go to components and select contentpage. You will see a content.jsp. This is the script using which the basic layout is created. All of the existing templates are created using JSP. In AEM’s context, it’s called a templating language. In AEM 6.0 release, Adode introduced a new templating language called Sightly. Sightly is HTML 5 and is very easy to use.

Let us wind up this session here. In the next session, we will create a template using Sightly.
To give you a summary:

  • CRXDE Lite is developers web console: http://localhost:4502/crx/de
  • content is the folder where all author-generated pages exist.
  • apps is the folder where you create templates and componenets associated with your project.
  • cq:template is a property associated with all templates.
  • sling:resourceType property of a template points the script that is used to render the layout.
  • JSP is the templating language in which all templates are written.
  • AEM 6.0 provides a new templating language – Sightly.

AEM Authors, Templates, and Components

In this section, you will see what exactly authors do with AEM. This session also gives an overview of templates and components. I thought it would be a good idea to record a video while I prepare the content. I used Adobe Presenter Video Creator. This is the first time I am using Adobe Presenter and it’s cool.

If you are keen, you would be able to watch the video in the Full Screen mode. I think my videos will improve as I progress in setting a stage for AEM learning.  :)

 

Now that you have installed AEM. Let us start exploring the default web interface that came up. Log in using admin and admin as user ID and password respectively. In the left panel, you will see the following:

  • Projects: All existing projects.
  • Sites: Sample sites that are reference implementations of your projects.
  • Apps: The apps related to your site.
  • Publication: All publications associated with your sites.
  • Forms: LiveCycle Forms.
  • Assets: Digital assets such as images, PDFs, docs, and so on.
  • Communities: Your communities.
  • Commerce: Catalogs, products, and so on. You can use this as a reference site if you need to implement a Commerce portal.
  • Tools: Various other consoles that you need for development.

In most of the projects using AEM, you will (eventually) develop a website. In most cases, you will have an existing website and you need to migrate to AEM. Let us first see one of the reference implementations in AEM. As I mentioned earlier, there are a couple of reference implementations in AEM. They are called sample sites. Click on Sites and you will see the following reference implementations:

  • Geometrixx Demo Site: It’s a typical website.
  • Geometrixx Mobile Site: This site is designed for mobile devices. The content used for Geometrixx Demo site is repurposed for this site.
  • Geomotrixx Outdoors site: It’s a commerce implementation.

Let us explore Geometrixx Demo Site.

  1. Double-click Geometrixx Demo Site.
    You will see different language codes. These codes represent the same website in those languages.
  2. Move the cursor over English and select Edit.
    The page is opened in a new browser window.

The page is in the Edit mode now. It means that you can update the page.

The pane you see in the left is the Asset pane. You can drag and drop your digital assets to your page.

The small pane you see is fondly called the side kick. What you see inside the sidekick are called components. You can drag and drop components to your page. For example, the Image component. Assume that you want to add an image to the page. First drag and drop the Image component to the page. Double-click the image component. It opens a dialog box, from the Assets pane, drag and drop an image.

The Activity that you performed now is an Author activity. Authors in your organization create or update content. Now let us try to create a new web page. To do that, let me take you to a different console – SiteAdmin.

  1. Type the URL: Http://localhost:4502/siteadmin
  2. Select Geometrixx Demo Site > English. This is the location where you want to create a page. Click New > New Page. Give it a name.
  3. Also, select a template. A template defines the basic layout of your web page.
  4. After creating the page, double-click it to open.
    Observe that the page is not really blank. It has provided you with a basic layout. On top, it has provided you with a site icon, search bar, and a navigation bar.

Similarly, at bottom it has given you a couple of links. On your right, you are provided with a small pod with some content. You would have noticed that, these are common to all the pages you create based on a template. Whatever, you saw in the page is content displayed in a specific manner. And, they are called components. Now you have the page. You need to fill the page with information. From the component pane, drag and drop a Text component to the page. Click to select and click to edit.

Type some content. You can continue filling the content by adding different components. For example, image, table, and so on. As I mentioned earlier, this is an Author’s job. And, you would have assumed by now – a developer creates the template and components that an author uses. Site Admin is a web interface Author uses. Similarly, there are some interfaces developer uses, which you will see in the next session.

I hope you are now able to differentiate two main roles in AEM.

To take a recap:

We saw a web interface that authors use frequently: Site Admin. That’s where an author create or update content.

Explore the installation directory

Now, we have installed AEM and started it. Before we log into AEM, let us see what exactly it created in your system. Move to the installation directory – that’s the directory to where you copied the QuickStart jar file and the license file.

You will notice that it created a folder, crx-quickstart. Whenever you start AEM for the first time, it creates the QuickStart folder. It saves all the required data inside it. After you make changes, it saves the changes there. Since you have started AEM once, it retains the folder for subsequent restarts. You will notice that whenever you start AEM for the first time, it takes a little longer time to start, because it needs to create the QuickStart folder.

Move into the QuickStart folder. Let us not get into a lot of technical details for the time being.

directory-structure

Following are the two folders that I would like you to familiarize with:

  •  Logs: The logs files. There is an error.log file inside it. We will use error.log file frequently to see what went wrong with AEM if it misbehaves.
  • repository: Navigate inside it. Go inside segmentstore. You will see a lot of tar files.
    tar-files

AEM stores that data in this format. This is the default configuration. You can also save the data in MongoDB. We will see that later.  There are more folders and files. We will explore them in detail later.

Starting AEM

Let us see how you install and start AEM. You first need to get an AEM installation file, which is fondly called as the QuickStart file. Adobe doesn’t provide you a trail version of the same. One of the ways to get an installation file is to attend Adobe Training Services class room session. Adobe distributes the installation file in the class room trainings.

AEM installation file is a jar file. It will accompany with a license file – license.properties. The License file contains the license information that you need to run AEM. If you are using AEM in a production environment, that is for hosting your content in real-time, you need to pay the license fee and obtain the license.

AEM is licensed based on various modules it offers: Sites, Apps, Forms, Community, and Assets.

  • Sites: Allows you to create websites.
  • Apps: Allows you to create apps used for hand-held devices.
  • Forms: Allows you to manage LiveCycle Forms.
  • Assets: Allows you to manage digital assets, such as images, icons, pdfs, and so on.
  • Community: Don’t ask me what it is used for. :)

The license file that you obtained for training purpose allows you to use all these functionalities.

Let us install AEM. Wait a second. You need to have Java 6, specifically JRE 6, installed in your machine. Obtain JRE from the Oracle website at free of cost.

  1. Copy QuickStart jar file and license file to a folder named AEM.
  2. Rename the QuickStart jar file as follows: aem-author-4502
    (I don’t remember the original name of the QuickStart file.)
    When you install AEM, it takes some key variables from the file name itself. In this case, the first string aem represents AEM itself.Next one, author, represents that it’s an author instance. (I hope I am not adding a lot of jargons.) It means that you use it for authoring your content. This instance mostly used by people in your organization to add, edit, and delete content. People outside your organization doesn’t take care of these tasks. They simply view the content.

    The third part 4502 indicates that AEM will run on that port number. That means if some other process is already using that port, AEM quits. (Drobo uses that port by default.)

  3. Double-click the file you created. It will bring up a pop-up window as shown below.
    srat-aem
    Soon, it will change as follows. AEM is started.  (Now, don’t ask me how to stop AEM.)
    started-aem 

    Don’t close this window. If you happen to close this window, you need to kill AEM from the Task Manager to stop it. Once AEM is up, your default browser opens up and shows you the login screen. Log in using admin as user name and admin as password. You will see the Project management page after a successful login.

    aem_welcome

     

    We will explore various pages in a short while – after we have a quick look at the folder where you copied the QuickStart file.

Why AEM?

iconAdobe Experience Manager (AEM) manages the user experience of your website (content) across various channels. In a globalized world, you need to manage content across multiple websites in various languages. Your content is consumed using various devices – hand-held devices, such as mobile phones and tablets, PCs, and so on. This results in a scenario that you have plenty of user experiences to manage. You need to provide optimal experience in both iPhones and Android phones. And, the same is applicable across thousands of other devices. AEM helps you to achieve this goal effectively and effortlessly.

AEM is one of the solutions in Adobe’s Marketing Cloud ecosystem. All solutions in Marketing Cloud complement each other and provide you with key solutions to effectively manage user experiences. The following diagram represents various solutions in Adobe Marketing Cloud: (Taken from Adobe’s website.)

marketing_cloud

Let me cite a few examples for how this ecosystem helps you to provide better user experience.

I am sure all of us would have visited online shopping sites many times. Which is the most commonly used feature in an online shopping site, such as Amazon? It definitely is the Search feature. You normally won’t traverse through menu options such as Men’s and then Boots,  …. and so on. You just search for the product you need. There can be thousands of users who do the same thing while you search for a product. For online shopping sites, the Search feature must be very efficient. Adobe Marketing Cloud provides you with a solution named Site Search. You can easily integrate Site Search with AEM. This capability indexes all your products and details, as Google indexes a website information. When a user searches for a product, the Site Search provides the search result and makes this operation extremely fast.

Similarly, tracking your users is very important to serve them better. You need to know the geographical areas they come from, the web pages they visit, and so on. AEM can be integrated with Adobe Analytics easily. This gives you a great reporting capability and statics about your user behavior.

Content personalization is another important aspect of your website. You should be able to customize your website based on your user profile. If your user is a male of a certain age group, provide the user with something he finds appealing. Change it accordingly if the user is a female of a certain age group. Adobe’s Marketing Cloud solution, Adobe Target, does it for you effortlessly.

Adobe Social (a capability in Marketing Cloud solution) helps you to integrate AEM with Social Media. Adobe Campaign allows you to manage digital campaign effortlessly. In short, AEM along with other Marketing Cloud solutions helps you to provide a great digital experience to your users. It indeed transforms your content into experiences that result in better customer reach, retention, and high ROI.

In the next post, you will see the underlying technologies on AEM.

Adobe Lightroom for Android

Adobe Lightroom for Android is available today.
For more details, see the official blog.