Dynamic modules

Overview

You create a dynamic module when the built-in Sitefinity CMS modules do not suit your needs. A module must have at least one content type. You create this type when you create the module. A module with one type can be, for example, an FAQ module, whose content type can be FAQs and FAQs can have two fields – Question and Answer. You can also have more than one content type in one module and you can have a hierarchy of the content types. For example, the Forums module has Forums and Threads content types, and Thread is a child of a Forum.

You first create the dynamic module and its first content type, then you activate the module and you can create more content types.

NOTE: If you are using Sitefinity CMS to manage multiple sites, if you create a module with the Module builder after you create a site, it is not automatically activated for this site. If you want to use it, you must manually activate it. For more information, see Edit sites and set site permissions » Configuring the modules of a site.

NOTE: Build-in and dynamic modules can be in one language – the backend language, but content items of dynamic modules can be multilingual.

Create a dynamic module

  1. In Sitefinity CMS backend, navigate to Administration » Module builder.
    The Modules page lists the existing modules.
  2. Click Create a module.
    The Create a module page opens.
  3. In the Name input field, enter the name of the module.
    For example, FAQ.
  4. In the Description input field, you can enter a description of the module.
    The description is displayed in the backend, in the list of modules on the Module Builder page.
  5. Click Continue.
  6. In the next step, the system takes you to create the first dynamic content type of the new module.
    For more information, see Dynamic content types » Create a dynamic content type.
  7. To activate the module, click Activate this module.
    For more information, see Activate and deactivate dynamic modules below.

RESULT: When you activate a module, the module appears under the Content tab, together with all of its first-level content types, and you can use it to create dynamic content items. Sitefinity CMS also adds a new widget group for each module and one widget for each content type. You use this widget to display the content items created with this module.

IMPORTANT: If you are working in a multisite environment, enable the module for each site where you want to use it. For more information, see Edit site properties and configure site modules » Configure the modules of a site.

Activate and deactivate dynamic modules

To use a module, it must be active. If you have created a module that does not appear under the Content tab, it means that you have not activated the module.

To activate or deactivate a module, perform the following:

  1. In Sitefinity CMS backend, navigate to Administration » Module builder.
  2. Perform one of the following:
    • Click the Actions link of the module that you want to activate and click Activate or Deactivate respectively.
    • Click the module you want to activate and then click Activate this module or Deactivate this module respectively.

When you activate a module, the module appears under the Content tab, together with all of its first level content types – you can use it to create dynamic content items. Sitefinity CMS also adds a new widget group for each module and adds one widget for each content type. You use this widget to display the content items created with this module.
When you deactivate the module, it is removed from the Content tab and from the widgets toolbox.

Modify the backend screens of a dynamic module

Use this procedure to add or remove fields, and to change the screens, which the module uses in the backend.

You can:

  • Choose what information is displayed for the items by changing the columns of the list of all items.
  • Configure how the form for creating dynamic content items looks like.
  • Reorder and group fields.

Choose which columns to display

To change the columns displayed on the page of the module, perform the following:
  1. In Sitefinity CMS backend, navigate to Administration » Module builder.
  2. Click the module whose screen you want to change.
  3. Click Backend screen tweaks.
    The Backend screen tweaks: <your module name> screen appears.
    For each created content type, you have a section to edit its grid and item creation form.
  4. Click Add / remove columns in the table (grid) of the respective content type.
    The Edit the columns for listing screen appears.
    Under Existing columns, the system displays all columns of the table containing the dynamic content items.
    Under Drag columns, the system displays a list of all available columns.
    • To add columns in the grid, drag them from the Drag columns pane and drop them under Existing columns.
      Columns that appear inactive are already added. Columns that appear active can be dragged under Existing columns.
    • To delete currently displayed columns, click .
      The Title, Actions, and Publication date columns cannot be deleted.
    • Toreorder columns, drag them.
  5. When you are finished, click Save changes.

Change the form for creating and editing dynamic content items

Perform the following:
  1. Click Administration » Module builder.
  2. Click the module whose screen you want to change.
  3. Click Backend screen tweaks.
    The Backend screen tweaks: <your module name> screen appears.
    For each created content type, you have a section to edit its grid and item creation form.
  4. Click Reorder fields of the respective content type.
    A form displaying all visible fields and section headings appears.
  5. You can reorder the fields of the form using drag and drop.
  6. You can group fields in sections by putting them under a section title.
    • To add a section heading, under Drag between fields… pane on the right of the screen, drag Section title and drop it between the fields. The fields below the Section title become part of the section.
    • To remove a section, click .

      NOTE: To remove or hide fields in a form, you edit the content type fields. For more information, see Dynamic content types » Edit dynamic content types and their hierarchy .

    • To configure how a section is displayed, click the Edit link of the section.
      1. To display the title of the section, select Display title and options for expanding / collapsing.
      2. If you do not select the checkbox, the section appears without the title, and you cannot expand or collapse it.
      3. In Title, enter the title of the section.
        For example, Advanced.
      4. Select the Collapsed by default checkbox if you want the section to appear collapse with the option to expand it.
      5. Click Save.
  7. When you are finished, click Save changes in the toolbar.

RESULT: The form that you have configured will appear when a dynamic content item is created.

Import and export a dynamic module

Use this procedure to export or import the structure of the module, or to export content items created with this module.

Export the structure of the dynamic module

You can export the structure and the settings of the module you have created. This way you can upload it to another project. The settings and the structure are exported to a .zip file.

Perform the following:
  1. In Sitefinity CMS backend, navigate to Administration » Module builder.
  2. Click the Actions link of the module you want to export.
  3. In the dropdown box, click Export structure.
  4. Click Export and save the .zip file on your computer.
    You can then use this .zip file to import the module in another project.

NOTE: No content created with this module is exported. To do this, see the procedure below.

Import a dynamic module in Sitefinity CMS

You can import a dynamic module from a .zip file, which you can then activate and use in Sitefinity.

Perform the following:

  1. In Sitefinity CMS backend, navigate to Administration » Module builder.
  2. In the toolbar, click Import a module button.
  3. Click Select a file and browse your computer to find the .zip file of the module you want to import.
  4. Click Upload.
  5. If you are importing a module that already exists, the Update dialog appears, explaining the changes which will be done to the existing module.
    If you want to continue the procedure, click Update.

RESULT: The module is uploaded in status Inactive. To use it, you must activate it using procedure Activate and deactivate a dynamic module above.

Export content items created with the dynamic module

You can export the content items that are created with a dynamic module. The items are exported in an Excel file. Only Published items are exported to the file. The file contains the URL of the content item, its publication date, and the values of all fields of the content item. For example, if the content item contains an image, the URL of the image is exported, if the item contains text, entered with the text editor, the HTML of the text editor is exported.

To export dynamic content items, perform the following:

  1. In Sitefinity CMS backend, navigate to Administration » Module Builder.
  2. Click the Actions link of the module you want to export.
  3. In the dropdown box, click Export content.
    The Export module content dialog appears.
  4. Select the data source where you want export data from.
  5. To save the content as an Excel file, click Export.

Edit and delete a module

Change the name and the description of a module

To do this, perform the following:

  1. Click Administration » Module builder.
  2. Click the module whose name or description you want to change.
  3. Click Name and description.
  4. Enter the new name and description and click Save.

Delete a module

IMPORTANT: If you delete a module, you cannot use this module or its content items anymore. 

To delete a module, perform the following:

  1. In the main menu, click Administration » Module builder.
  2. Click the Actions link of the module you want to delete and click Delete.
  3. Confirm the deletion.
    The dynamic module, the module widget, and all content items created with the module are deleted.

: If you want to delete a module, but use it later, you can export, delete, and import later. For more information, see the procedure Import and export a dynamic module above.

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?

Next article

Dynamic content types