Posted on 24/08/2023 12:35:35
Here is part of the Carousel Item Type XML, we dont do custom stuff on ItemTypes, we like the database synchronization, Ive omitted irrelevant code:
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<items>
<item category="Page Content" name="Carousel" systemName="Carousel" description="Add a Carousel to your page" icon="FileO" iconColor="None" image="" includeInUrlIndex="False" pageDefaultView="item" fieldForTitle="" title="" inherits="">
<fields>
<field name="Images_MISSED_TYPE" systemName="Images" description="" type="System.String, System.Private.CoreLib" excludeFromSearch="False" defaultValueCulture="en-GB" defaultValue="System.Collections.Generic.List`1[System.String]">
<editor type="Dynamicweb.Content.Items.Editors.TextEditor, Dynamicweb">
<editorConfuguration><Parameters addin="Dynamicweb.Content.Items.Editors.TextEditor" /></editorConfuguration>
</editor>
<options sourceType="Static">
<Static>
<option name="Link" value="Link" icon="" />
<option name="Image" value="Image" icon="" />
<option name="Title" value="Title" icon="" />
<option name="Alternative Text" value="Alternative_Text" icon="" />
</Static>
</options>
</field>
... Omitted for clarity
<field name="Content Button" systemName="Content_Button" description="" type="System.String, System.Private.CoreLib" excludeFromSearch="False">
<editor type="Dynamicweb.Content.Items.Editors.ItemTypeEditor, Dynamicweb">
<editorConfuguration><Parameters addin="Dynamicweb.Content.Items.Editors.ItemTypeEditor"><Parameter addin="Dynamicweb.Content.Items.Editors.ItemTypeEditor" name="Item type" value="Hyperlink_Button" /><Parameter addin="Dynamicweb.Content.Items.Editors.ItemTypeEditor" name="Enable presets" value="False" /></Parameters></editorConfuguration>
</editor>
</field>
</fields>
<rules>
<rule name="Allow in websites" type="Dynamicweb.Content.Items.Activation.AreaRestrictionRule, Dynamicweb" value="*" />
<rule name="" type="Dynamicweb.Content.Items.Activation.ChildItemTypeRestrictionRule, Dynamicweb" value="Carousel_Image,Hyperlink_Button" />
<rule name="Allowed children" type="Dynamicweb.Content.Items.Activation.ChildRestrictionRule, Dynamicweb" value="" />
<rule name="Allowed parents" type="Dynamicweb.Content.Items.Activation.ParentRestrictionRule, Dynamicweb" value="RegularPage" />
<rule name="Enable item type for" type="Dynamicweb.Content.Items.Activation.StructureRestrictionRule, Dynamicweb" value="Paragraphs" />
</rules>
<layout>
<groups>
<group name="Carousel" systemName="Carousel" collapsibleState="None" visibilityField="" visibilityCondition="0" visibilityConditionValueType="" visibilityConditionValue="">
<fields>
<field systemName="Images" />
</fields>
</group>
<group name="Carousel Content" systemName="Carousel_Content" collapsibleState="None" visibilityField="" visibilityCondition="0" visibilityConditionValueType="" visibilityConditionValue="">
<fields>
<field systemName="Content_Heading" />
<field systemName="Carousel_Content" />
<field systemName="ShowCharLength" />
<field systemName="Content_Button" />
<field systemName="ThemeSelector" />
</fields>
</group>
</groups>
</layout>
</item>
</items>