Classifications custom field

NOTE: Sitefinity CMS does not allow you to change the name of the custom fields of type Classification. The name always depends on the classification type you are using.
You cannot change the built-in classification types – categories and tags. You can add or delete custom classifications and edit the built-in ones.

Static content types

Static content types are the ones coming out of the box with Sitefinity CMS, such as Pages, Blogs, News, and so on.

To add a custom field to a content item, perform the following:

  1. Perform procedure Create custom fields » Step 1 to Step 5.
  2. In the Type dropdown box, select Classification.
  3. From the Classification dropdown, select which classification type you would like to use. For more information, see Use categories and Use tags.
  4. If you select This is a hidden field checkbox, the custom field is not visible on the website or in the backend, you can only use it in the code.
    You can later unhide the field, by clicking it in section Custom fields and changing the selection on Appearance tab.
  5. In Interface widget for entering data dropdown box, you select the widget which the editor of the content item will use to complete the field.
    RECOMMENDATION: We recommend using the Tree-like selector when using with categories and the Textbox selector when using tags. These widgets enable content editors to select existing categories or create new ones on the fly.
  6. Expand the Advanced section, if you want to change the SQL database type of the custom field, if you want to specify the name of the column of the database table where the custom field is added, and whether the custom field is to be included in the database index.
    If you select the Allow empty values checkbox, it means that the field is not required and can be left empty. If you deselect it, the field becomes mandatory.
  7. Click Continue.
    The Settings window appears where you must configure the appearance of the custom field, such as labels and instructions.

Label and texts

On this tab, perform the following:

  1. In Label input field enter the label of the textbox.
    For example, enter Categories.
  2. If needed, in Instructional text, enter instructions or explanatory text for the textbox.
    The text is displayed when the content editor clicks the question mark icon in the backend when editing the item containing this custom field.
  3. If required, in Predefined value, enter a predefined value for the textbox that is displayed in the box by default and the user can change it.
  4. If you want to make the textbox mandatory, select Make required.

Appearance

On this tab, perform the following:

  • If you do not want to display the custom field on all screens where you work with the content item, you can select the checkboxes of only those screens where you want the field to be displayed. To do this, select Some screens where you work with <content type> in the Backend… and select the screens where you want the custom field to appear.

    NOTE: When you are adding a custom field to Images, Videos, or Document, this field is displayed on the upload screen, when you upload items via the Image widget, Video widget, or Document link widget widgets. If you do not want to display the custom fields, deselect the upload screens.

  • If you have made the field a hidden field, radio button Nowhere. This is a hidden field is selected when you open the field for editing. If you change the selection, the field is no longer hidden.
    If the field is not hidden, you can hide it by selecting Nowhere. This is a hidden field radio button.
  • In the CSS class input field, you can choose a class name for the custom field if later you want to set a CSS style for this particular field.

When finished, click Done.
The new field appears in the list of custom fields for the respective module.
If you want to delete a custom field, click Delete.

Save your changes.

Dynamic content types

Dynamic content types are the ones you create using the Module Builder.

To add a custom field to a content item, perform the following:

  1. Perform procedure Create custom fields » Step 1 to Step 5.
  2. In the Type dropdown box, select Classification.
  3. If you select This is a hidden field checkbox, the custom field is not visible on the website or in the backend, you can only use it in the code.
    IMPORTANT: Once you create a hidden field, you cannot edit its properties. Make sure you have configured all its properties before finishing creating it.
  4. In Interface widget for entering data dropdown box, you select the widget which the editor of the content item will use to complete the field.
    The default widget is the Tree-like selector when using with categories and the Textbox selector when using tags. These widgets enable content editors to select existing categories or create new ones on the fly.
  5. Expand the Advanced section, if you want to change the SQL database type of the custom field or the name of the column of the database table where the custom field is added.
    If you select the Allow empty values checkbox, it means that the field is not required and can be left empty. If you deselect it, the field becomes mandatory.
  6. Click Continue.
    A window appears where you must configure the appearance of the custom field, such as labels and instructions.

General

On this tab, perform the following:

  1. In Label input field enter the label of the textbox.
    For example, enter Tags.
  2. If you want to make the textbox mandatory, select the This is a required field checkbox.

Limitations

On this tab, you can select whether the content editors can assign only one or multiple classifications per item.

When finished, click Done.
The new field appears in the list of custom fields for the respective module.
If you want to delete a custom field, click Delete.

Save your changes.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?