·¬ÇÑÉçÇø

Brightspot CMS Developer Guide

Configuring preview types


Brightspot provides two options for configuring the available preview types for a specific content type: programmatic and admin. This topic explores each option in detail.

Programmatic configuration

Programmatic configuration is useful when you want a particular content type to always use a specific preview type. To programmatically configure the preview types, you need to implement the PreviewTypeSupplier interface on the relevant content type. Once implemented, you must provide an implementation for the getPreviewTypes method, which takes the preview object as input and returns a list of all the supported preview types.

Assets implementing PreviewTypeSupplier support only the preview types returned by the getPreviewTypes method. However, keep in mind that the shouldDisplay method of those preview types must still return true for the given preview object in order for them to be displayed in the UI.

Admin configuration

Administrators can configure the available preview types for a specific site using the admin interface in Sites & Settings. To access this configuration, navigate to the menu > Admin > Sites & Settings > CMS Tab > Preview Cluster > Preview Types field. Here you can define the preview types that should be available. Any preview type whose shouldDisplay method returns true for a given preview object will be displayed as an available preview type in the UI, unless a content type implements PreviewTypeSupplier as described in the previous section.

By utilizing these configuration options, you can customize the available preview types for your content types either programmatically or through the admin interface. This allows you to control how content is previewed, and ensures that the appropriate preview types are available for your specific needs.

Previous Topic
Creating a custom Preview Type
Next Topic
Search engine optimization
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

•
•
•
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

• Content types
• Modules
• Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

• Dashboards
• Publishing
• Workflows
• Admin configurations
A guide for installing, supporting, extending, modifying and administering code on the Brightspot platform.

• Field types
• Content modeling
• Rich-text elements
• Images
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

• Google Analytics
• Shopify
• Apple News