Return to

11.  Adding a Custom Field to Sitecore Client
Prev Next

Define a logical type of the new field. In our example the type is “List”. In the Core database, find the appropriate folder under /sitecore/system/Field types and create there a new field type declaration item, based on the Template field type template which is located in the /sitecore/templates/system/Templates folder. Fill the fields in the Data section as shown below: 

 /upload/sdn5/articles 2/api/creating custom field/create_custom_field_15.png

On the picture above, 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.

Note: If you don’t need to add a lot of custom fields or if they are in the different namespaces, you can skip the “10.  Web.config Settings” step and fill the Assembly and the Class fields instead of the Control one. In our example corresponding values should be “CustomChecklist” and “Sitecore.Shell.Extensions.CustomChecklist”.

The result will appear like:  

 /upload/sdn5/articles 2/api/creating custom field/create_custom_field_16.png

 You might want a menu with commands:

  /upload/sdn5/articles 2/api/creating custom field/create_custom_field_17.png

In this case, do the following:

  1. Create a Menu item under the field definition item, based on the Folder template 
  2. Create the menu items under the Menu folder, based on the /sitecore/templates/System/Menus/Menu item template. Fill their fields in the Data section as shown below:

/upload/sdn5/articles 2/api/creating custom field/create_custom_field_18.png

Prev Next