Skip to main content

Dynamic modules

An asset often includes a module—a layout for one or more associated assets. Brightspot's standard curated style groups provide a method for configuring shared style groups, so you avoid re-configuring the same module for multiple assets. Over time, the number of curated style groups can become large, and editors may have difficulty finding the correct module to apply to a particular asset. With Dynamic Modules, curated style groups are associated with content types and presented in an intuitive folder structure. This association ensures editors can easily apply a module to a given asset.

Note

Dynamic Modules is an extension to Brightspot. To include this feature in your own Brightspot project, see the build instructions in the corresponding README.md file.

Video demo

Brightspot's Dynamic modules platform extension provides a method for curating which modules are available to certain content types, saving editors the time it would take to scroll through a large list to find the right module for a given asset.

See the demo below for a walkthrough of this feature.

Understanding content types and dynamic modules

Dynamic modules ensure that editors always choose the right module for a given content type. Developing a set of dynamic modules requires the following steps:

  • Create a curated style group.
  • Associate the curated style group with content types.
  • Add modules to the curated style group.

Referring to the following illustration—

  • The content types Homepage and Page are associated with two curated style groups: Lists and Containers.

    • The Lists curated style group contains two categories of modules:

      • List Module (with two standard modules Standard List A and Standard List B)
      • Person List Module (with standard module Person List)
    • The Containers curated style group contains two categories of modules:

      • Container Module 1 Column (with standard module One Column Container)
      • Container Module 2 Column (with standard module Two Column Container)

Curated style groups with content types

In this scenario, Brightspot organizes the available modules similar to a file explorer. For a given content type, the curated style groups are at the top level, module categories are at the second level, and modules are at the third level.

Using the example above:

  • The Homepage content type is associated with the Lists curated style group.
  • The Lists curated style group contains two module categories—List and Person List, of which the former is selected.
  • As such, the editor only sees Standard List A and Standard List B, which are the standard modules associated with the Lists module category.

Associating curated style groups with content types

You can associate curated style groups with content types to ensure editors always choose the right module for a given content type.

To associate curated style groups with content types:

  1. Click > Admin > Sites & Settings.
  2. In the Sites widget, select the site for which you want to associate curated style groups with content types, or select Global to configure the association for all sites.

  3. Expand CMS > Style Groups.

  4. Click Add Curated Style Group.

  5. In the Display Name field, enter a name for this curated style group. This display name appears as the curated style group in the module picker (see the illustration "Dynamic modules for a content type" in Understanding content types and dynamic modules).

  6. In the Types field, click to add one or more content types.

  7. In the Styles field, do the following:

    1. Click Add Module to open the module picker.
    2. In the left rail, select one of the categories.
    3. In the right rail, select one of the modules.
    4. Select one of the modules. Back in the Styles field, do not configure the module; leave all its fields blank.
    5. Repeat steps a–d to add additional modules.
  8. Click Save.

When creating an asset, editors see only the associated curated style groups and modules in the asset's module picker.

5.0-dynamic-modules-(homepage)