Table of Contents

Item Types

Create custom content types or settings using item types

Item types are flexible components that allow implementers and designers to create structured, reusable content elements, making site management more efficient and consistent - e.g.:

Editors can then create new instances of an item type - e.g. a custom page or paragraph. An instance of an item type is called an item.

Create new item type

Item types are created and managed under the Item types-node. Click on the top node to see a list of all item types on a solution, or browse the folder structure to see subsets: ItemTypes_01 Creating an item type is simple:

  1. Open an item type list and click New item type
  2. Use the item type settings to set the item type name, role, category, etc.
  3. Add item type fields to the item type
  4. Open the item type restrictions and define where this item is allowed to be used

Once created and fully configured, item types are available where made available - e.g. when creating new pages or paragraphs, as website or page settings, etc.

Item type settings

The item type settings are are used to control:

  • What an item is called
  • What it can be used for
  • How you want it to appear in the administration UI

You can access the item type settings when creating an item type or from the context menu or action menu for an existing item - they look like this: ItemTypes_02 The item type settings consist of:

  1. A section for providing a name, a system name, a description, a category and an icon
  2. A section for defining what this item type can be used for:
    • As a custom page
    • As a custom paragraph type
    • As a row in a grid-based design
    • To extend website- and page properties
  3. A section controlling how new items based on this type are named:
    • Field for title - select an item field to use as the title for items based on this item type
    • Title - explicitly specify an item field system name to create a title from using a {{Field1SystemName}} format. When this field is in use, the 'Use field for title' will be ignored
  4. A section with advanced settings:
    • Allow module attachment controls if an editor can add paragraph apps to an item based on this item type
    • Allow color schemes controls if it should be possible to set a color scheme on this item type
    • Default view in page controls which view is opened by default; a view of the Item-fields or the paragraph list view
    • Inherit from allows you to select another item type to inherit fields from - this field is only available when creating a new item and cannot be changed afterwards

Item type fields

Technically, item types are collections of fields which are then attached to system objects - e.g. a page, a paragraph, or a row - extending or supplanting the standard fields with the ones defined in the item type.

When the editor creates a new instance of an item type, the fields defined on the item type are shown as input fields which can be edited and enriched with data.

Item fields are created and managed from the Fields-interface which appears in the content pane when you create or edit an item type: ItemTypes_03 To add a field to an item type:

  1. Click New field to open the field settings.
  2. Enter a name, a system name, and optionally a description
  3. Select a field type
  4. Use the Layout section to set a field group and a position within the group
  5. Use the Data settings to:
    • Set a default value for the field
    • Check Do not include in search checkbox is to exclude this field from repositories using the default Content indexes
  6. Use the Validation section to:
    • Make the field required
    • Add a validation expression using regular expressions and an error message to display if a user tries to save a value to this field which does not validate against the expression

As per the previous steps and (and the screenshot), item type fields may be organized in field groups: ItemTypes_05 This is useful for two reasons:

  • It's easier to see what's going on when fields are grouped
  • You can set conditions on when to show a particular field group

To create a field group click New group in the item type toolbar and fill in the field group settings

ItemTypes_06

Item type restrictions

The item type restrictions control where an item type may be used - by default, new item types are not available anywhere, so editing the item type restrictions is an important step in creating a new item type.

To edit the restrictions of an item type open a context menu for the item type in list view, or use the action-menu from the fields list, and click item restriction. This opens the restrictions tab:

ItemTypes_07

The following settings are available:

  • Allowed websites controls which websites you want to make this item type available for
  • Allowed parent types controls whether this item type can be used in the root of a website and under a folder
  • Allowed tree sections controls which tree sections the item type can be placed under
  • Allowed parents controls which item types this item type can be used under
  • Allowed child types controls whether a folder can be created under this item type
  • Allowed children controls which item types can be used under this item type

Item types tools

Two useful tools for item types are available from the Item types node's context menu:

  • Refresh - the refresh action will try to refresh item type settings and schema
  • Meta and schema check - the tool will list all fields of an item type in a table where you can see what fields are in a schema and what fields are not. Use the tool to clean your item types.

ItemTypes_08

To top