By default, designs are defined by blueprints, which determine all the attributes that are initially created within a design. In addition Alloy allows you to create custom attributes that are also included in the design. A stencil allows you to define how the attributes are displayed when any item based on the design is viewed once it has been created. A design may include attributes that you do not need to view for items, alternatively you may need a different way of displaying the attributes.

The Stencil editor allows you to hide attributes that you do not want to use or add additional controls that are linked to the design attributes that you require.

Accessing the stencil editor

A default stencil is generated when you open the stencil editor with controls for each attribute within the design. To access the stencil editor use the following procedure:

  1. Select a design to view its details in the Item details panel.
  2. In the Item details panel, the General page is displayed by default.
  3. Select the more actions button from the action bar.

alt text

  1. Select Edit stencil. The stencil editor is displayed and replaces the map area.

alt text

Understanding the stencil editor

By default the stencil editor contains all the default controls for the attributes within the design you selected. This includes all mandatory, optional and custom attributes.

The image below illustrates the relationship between attributes in the design, the stencil and the item details as they appear when the item has been created.

alt text

There are default attributes and properties, Title, Sub-title, Icon, Colour and Collection that are always displayed for an item and the stencil editor does not include any controls that allow you to hide or alter their position. For all the remaining attributes that are defined within a design the stencil editor acts as an overlay that allows you to hide individual attributes or change the order that they appear in when an item is displayed. In addition you can add extra controls to view data that meets your requirements.

The stencil editor does not change the design itself and you can always reset the stencil to the default stencil layout.

Stencil editor tools

You can access the stencil editor tools using the More actions button in the bottom righthand corner of the stencil editor screen.

alt text

The following tools are displayed:

Add control - you can insert additional controls in the stencil.
Reset stencil - this allows you to reset the stencil to the default list and order of attributes from the design.
Save stencil - when you have completed editing the stencil you need to save it to use the new layout when creating items or viewing existing ones..