Adding a New Item Template to the System

If you want to subtype an existing item type with the purpose to have a different front end view configuration for this subtype, you have to add a new cockpit item template to the system. Afterwards you can assign specific configurations to this item template.

The item template is related to instances of this item type either directly by setting a relation using the assignedCockpitItemTemplates attribute or indirectly by finding potentially matching instances, which match the rules of the cockpit item template. For details, see the Type Service - Object Types and Templates.

Creating a New Template

This section describes how to create and add a new object template to your system.

For demonstration purposes, create a new template camera. You create a template for products and define a set of classification classes which should apply to all cameras for example from electronics, hardware and photography, because these are the classification categories applicable from the sample data extension.

  1. First, create a new item template in the Backoffice Administration Cockpit:

    Go to Start of the navigation pathCockpit Next navigation step Item TemplateEnd of the navigation path and click the plus icon in the toolbar to open the Create New Item Template wizard.

  2. In the displayed editor, you need to specify the mandatory values and then click DONE:
    • Code - The template's unique code

    • Type - The item type to which this template can be applied

      Time created

    • You can add some classification classes to your template. Open the created item and in the Editor Area add Classification Classes and select Add Classifying Category

Assigning a Template to an Item

This section describes how you can assign a template to an item.

For more information on directly assigned templates and potential templates please, see the Type Service - Object Types and Templates.

Suppose you want to assign our newly created template camera to one of the items currently in the classification class Photography.

  1. First. log in to Product Cockpit
  2. Right-click the Computer hardware Staged catalog in the catalog selector and select Display Categories --> 2 Level
  3. Select Photography located under Peripheral equipment. You should now see a list of products in the browser area
  4. Double-click the item you want to assign the template to. The editor area id displayed in the right side.
  5. In the Administration section find the Assigned Cockpit Item Templates attribute.
  6. Set the attribute value by typing camera
  7. The new template is assigned

Using Templates When Customizing Cockpit UI Components

One of the advantages which comes with the usage of templates is the possibility of further customization the Cockpit UI.

The Cockpit UI Configuration mechanism allows different configurations to be used for different contexts, object templates and UI user roles. This means that you have the possibility to add new UI component configurations for your added template. These configurations only apply to items which have your camera template assigned.

This section shows you an example of this. For more information on how to configure your Cockpit User Interface, please see the Configuration of the Cockpit UI.

Add a new editor area configuration for your template.

Below you can see a picture showing the changes made to the configuration.

You can see the differences between the editor configuration for a normal item and a camera on the picture below.