11.  Adding a Custom Field to Sitecore Client
Prev Next

Add a new field type under System/Field types. Base the new field type on the Template field template which is located in the Templates/System/Templates folder.

Click on the field Item and fill in the Control field in the Data section as shown below:

contentExtension is the prefix for your field in the Web.config file, and CustomChecklist is the name of the class which represents the new field type.

If you need a drop-down menu for your field (see the picture above), you should do the following:

  • Create a Menu Item (based on the Folder template) under the field item;
  • Create the menu items under the Menu item. Use the Menu item template located in templates/System/Menus/ folder
  • The properties of the menu items can be modified in the Data section of these items:
  • Display name – the title shown in the drop-down menu in the client;
     
  • Message – the message sent to the system. For example, the message “checklist:checkall(id=$Target)” means that your field can handle the ”checklist:checkall” message in HandleMessage method.

 


Prev Next