Created custom field in Sitecore
Step 1: First we need to create the field in Core database. I have created Multilist field. We have to create the field in below Path
/sitecore/system/Field types/List Types/
Step 2 : We have to create config file to initialize the custom field. We have to specify the Namespace, AssessmblyName and Prefix.
Step 3 : We have to create class file to write the logic for updating DataSource for the custom field. In the logic StartSearchLocation will be replaced as current site which is parent of current item.
Path of the class file : Cirrus.Foundation.SitecoreExtensions.CustomFields.CustomMulltiListSearchField
Step 4 : Need to set the DataSource value for our custom field.
DataSource is nothing but when we creating the filed with custom field type, where we have to specify the DataSource for the multilist field.
StartSearchLocation=$sitenode&TemplateFilter={38190DCB-F949-4793-A664-6C7EEA33730A}|{06F76AAE-1054-4221-A92E-B9C821482784}|{3CE0849F-D058-4F61-ACE7-44F33874791C}
Comments
Post a Comment