Create a dynamic content type

You create content types from the module’s detailed page.

  1. Click Administration » Module builder.
  2. Click the module where you want to create a content type.
    The module’s detailed page appears.
  3. Click Add a content type button.
  4. In Content type (singular), enter the singular name of the content items that the module will store.
    For example, the singular name of the content type of the Events module is Event. For the FAQ module, you can enter, Question.
  5. You can change the automatically generated name that is used to refer to the content type in the code.
    To change it, in Developer name of this content type, enter the new name.
  6. If you want to create hierarchical content types, select the parent content type of the content type you are creating.
    You do this in the Parent content type dropdown box.
    For example, Blogs are parent content type of Blog posts.

    NOTE: Each content type can have multiple child content types.

  7. Add the fields of the content type by clicking Add a field… button and performing procedure Create custom fields » Step 4 to Step 13.

    For example, in the FAQ module, the content items can have a short text field Question, a long text field Answer, and you can also classify the questions, using categories.

    NOTE: You must create at least one field that is short text and required.

    NOTE: If you have chosen to add Choices field, such as radio buttons or multiple choice, you must enter a value for each choice you create. The value must be unique of each choice. It is not visible by users in the interface. Keep values as short as possible. You can enter, for example, 1, 2, and 3. These numbers are used by developers to refer the choice in the code.

    NOTE: If you are using multiple backend or frontend languages, you can automatically display the label in the respective language. This is valid for choice fields, such as radio buttons, dropdown boxes, and multiple choices. This way the choices of a radio button are displayed in the respective language automatically. To do this, create a new label using procedure Create labels. Remember the Key and the Type of the label. Then when you enter a choice, in the input field, enter the following: Resources:<Type of resource>, <Key of resource>.

  8. In Which field is the identifier of the content? dropdown box, select which field will be used to represent the content item and to generate its URL.
    You can select only a short text field that is marked as required.

    For example, if you have entered a frequently asked question How to install a module, then in the list of content items this question will be listed as How to install a module and its URL will be how-to-install-a-module.

  9. To be able to set individual permissions for each field of the content type, expand Advanced and select Allow permissions per field checkbox.
    For example, some users can change the answer to an FAQ; others can only view it, but can create questions.
  10. Click Finish.
  11. To create more content types, click Add a content type and perform this procedure again.

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

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to 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?