Creating App Templates

An App template is used to create a new app and acts as a collection of page templates and components that represent a baseline or foundation of an app. The template stamps out some fundamental properties to lead the app in the appropriate way. In general, a customer would not create too many apps in total.

App templates provide an easy way to leverage existing designs created by devlopers, used for the creation of new apps within AEM.

When creating a new app based on the template of another app, you will get an app that has a starting point representative of the app in which it was created from.

Once you create an app using this template, you can add articles, banners, and collections to your app. To re-visit, creation of articles, banners, and collections, See Content Management Actions.

Not:

Alternatively, you can also select a sample app template, for example We.Unlimited app, made available to you by an AEM developer. If you use this sample template for your app, you get some sample articles and collections to work on. You will have the option of using the sample templates and components, customizing the existing ones, or creating new ones for your app.

Dikkat:

Setting redirectTarget property

While using one of the app templates, the developer defines the content of the application. However, the developer must be aware where application gets created in the jcr and the value of redirectTarget property.

The redirectTarget is calculated as part of the create app operation and attempts to resolve a path, if there is a redirectTarget property available as part of the app template, and the value of the redirectTarget is defined as relative. When the create app process finds a relative value for the redirectTarget in the app template, the value is appended to the resolved location of where the app was created.

For example, if an app template defines a redirectTarget with a value of "lanugage-masters/en", and the app was created in "/content/mobileapps/fooApp", the final value for redirectTarget after the app as been created will be "/content/mobileapps/fooApp/language-masters/en".

Creating Content Templates

Each entity type has two out-of-the-box templates. These are:

Default templates: used for content creation with applicable default properties/structure

Imported templates: used for importing content from AEM Mobile with applicable default properties/structure

Article Templates

Click on + in Manage Articles to create a new article. You can choose either an Unlimited Article or a Rich Text Article. The image below shows the option that lets you choose from any of these two article templates.

This property ensures that the AEM page is recognized as an AEM Mobile targeted article page.

As per AEM templates, you can add any default properties or child nodes to the template's jcr:content.

Banner and Collection Templates

Dikkat:

Banners and Collections do not have content so their creation does not support custom templates.

Creating and Adding Components

Components use and allow access to Widgets and these are used to render the Content.

A simple component is included in the code repository, the source of which can be found in AEM. Subesequently, it can also be opened locally in CRXDE Lite.

Not:

There are currently no out-of-the-box components provided for AEM Mobile.

You can add components to your page. Any component can be used in an AEM Mobile app but when applied, may not render properly.

However, custom components may not export and upload to AEM Mobile On-Demand Services correctly without a custom export content sync handler that renders in AEM.

Once the component has already been included in an AEM page, along with a few other building block components, you can add another component to the page or edit an existing one.

To add another component to the page:

Choose that page and ensure you are in Edit mode, via the dropdown at the top right of the Editor's header

Toggle the side panel using the leftmost icon in the Editor's header

Select the Components tab

Drag and drop one of the available components onto the page

To edit an existing component:

Choose that page and ensure you are in Edit mode and select the component

Tap the wrench icon to configure the component

Not:

You can create a create a component in AEM and customize the same using Developing with CRXDE Lite. Once you have customized the existing component as your requirements, you can add it in your page using the Edit option under Manage Articles as shown in the figure above.