I have this field on my Article ItemType
[Field("Files", typeof(Dynamicweb.Content.Items.Editors.ItemRelationListEditor))] [Group("Files"), SortIndex(10)] [ItemRelationList("Files", "ResourceFile", SortBy = "", SortOrder = "ASC", ItemType = "ResourceFile", ItemSource = Dynamicweb.Content.Items.Editors.ItemRelationListEditor.ItemListSource.Page, Name = "", Description = "", Fields = new string[] { "Name", "Date" })] public int Files { get; set; }
But it won't write all my editorconfiguration in to the XML file like it does when I create a similar field in UI
My XML with code-first looks like this:
<field description="" name="Files" systemname="Files" type="System.Int32, mscorlib"> <editor type="Dynamicweb.Content.Items.Editors.ItemRelationListEditor, Dynamicweb"> <editorconfuguration> </editorconfuguration> </editor> </field>
My XML with the UI looks like this:
<field name="Files" systemName="Files" description="" type="System.Int32, mscorlib" defaultValueCulture="en-US" defaultValue="0"> <editor type="Dynamicweb.Content.Items.Editors.ItemRelationListEditor, Dynamicweb"> <editorConfuguration><Parameters addin="Dynamicweb.Content.Items.Editors.ItemRelationListEditor"><Parameter addin="Dynamicweb.Content.Items.Editors.ItemRelationListEditor" name="Item type" value="ResourceFile" /><Parameter addin="Dynamicweb.Content.Items.Editors.ItemRelationListEditor" name="Sort by" value="" /><Parameter addin="Dynamicweb.Content.Items.Editors.ItemRelationListEditor" name="Sort order" value="ASC" /><Parameter addin="Dynamicweb.Content.Items.Editors.ItemRelationListEditor" name="Item source" value="Page" /><Parameter addin="Dynamicweb.Content.Items.Editors.ItemRelationListEditor" name="Minumum number of items" value="" /><Parameter addin="Dynamicweb.Content.Items.Editors.ItemRelationListEditor" name="Maximum number of items" value="" /></Parameters></editorConfuguration> </editor> <options sourceType="Static"> <Static> <option name="Name" value="Name" icon="" /> <option name="Description" value="Description" icon="" /> <option name="Date" value="Date" icon="" /> <option name="File" value="File" icon="" /> </Static> </options> </field>
Any ideas are appreciated