Table of Contents

Item Types

Create custom content types or settings using item types

Item types are custom content types which are used extensively on most DynamicWeb solutions to used to:

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, and optionally a description
  2. A section for defining what this item type can be used for:
    • As a custom page or paragraph type
    • As a row in a grid-based design
    • To extend UserGroups or Users with custom fields
    • To extend Website- and page properties
    • The Allow module attachment controls if an editor can add paragraph apps to an item based on this item type
  3. A section for controlling how items based on this type appear in the UI:
    • Default view in page controls which view is opened by default; a view of the Item-fields or the standard paragraph list view
    • Icon - shown in lists for items based on this item type
    • Image - shown if creating a new page/paragraph based on this item type
    • Customized URLs enables custom URLs for paragraph and page items – these are generated from ParagraphName and PageMenuTitle
    • Category - this property controls which "group" in the item type tree the item belongs to
  4. A section controlling title and inheritance options:
    • Use field for title - select an item field to use as the title for items based on this item type
    • Title - explicitly specify item field system name to create a title from, in the {{Field1SystemName}} format. When this field is in use, the 'Use field for title' will be ignored
    • 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

Item types consist of fields - these are the input fields which you can fill in when creating an item-based page/paragraph or when using item-based page- or website settings.

They 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
  • Allowed parents controls which item types this item type can be used under
  • Allowed children controls which item types can be used under this item type
To top