Support and Documentation


By default, Brightspot displays the following standard widgets in the Content Edit Page: References, Revisions, SEO, Sites, Template, and URLs. Some of these widgets appear depending on an item's state. For example, the Revisions widget appears only after you save a draft, change a workflow state, or publish an item. In addition, Brightspot automatically displays any custom widgets created for the content edit page. (For information about creating custom widgets for the content edit page, see Creating and Creating updating content edit widgets.)

You can hide widgets at the content-type level and at the custom widget level.

Hiding widgets at the content-type level

You can hide the standard or custom widgets at the content-type level. For example, you can show the URLs widget on content edit pages for articles, and hide the widget on content edit pages for images.

The interface ContentEditWidgetDisplay contains a method shouldDisplayContentEditWidget that you can override to specify if a widget is visible or not in a content edit page. You implement the interface at the model level, which gives you the flexibility for showing or hiding widgets depending on content type. The following example shows how to hide the standard URLs widget in an article's content edit page.

import com.psddev.cms.db.Content;
import com.psddev.cms.db.ToolUi;
import com.psddev.cms.tool.ContentEditWidgetDisplay;
import com.psddev.cms.tool.content.UrlsWidget;
import com.psddev.dari.db.Recordable;

public class Article extends Content implements ContentEditWidgetDisplay {

    private String headline;

    private String body;

    public boolean shouldDisplayContentEditWidget(String widgetName) { 1
        if (widgetName.equals(UrlsWidget.class.getName())) {
            return false;
        } else {
            return true;


Implements the method shouldDisplayContentEditWidget. Brightspot calls this method for each widget eligible to appear in the content edit page. If the widget's name is the same as the URLs widget's name, the method returns false and the widget does not appear. See the following illustration.

Hiding custom widgets

If you create a custom widget, you can hide it from the content edit page—regardless of the content type—by overriding the shouldDisplay method in the widget's definition.

import com.psddev.cms.tool.ContentEditWidget;
import com.psddev.cms.tool.ContentEditWidgetPlacement;
import com.psddev.cms.tool.ToolPageContext;

public class CurrentTimesWidget extends ContentEditWidget {

    public void display(ToolPageContext page, Object content, ContentEditWidgetPlacement placement) throws IOException { 1

            page.writeHtml("My widget for personal notes.");
        page.writeEnd(); /* p */

    public ContentEditWidgetPlacement getPlacement(ToolPageContext page, Object content) {
        return ContentEditWidgetPlacement.BOTTOM;

    public String getHeading(ToolPageContext page, Object content) {
        return "My Custom Widget";

    public boolean shouldDisplay(ToolPageContext page, Object content) { 2
        return false;


Defines a custom widget that appears under the content edit form.


Hides the custom widget from the content edit page. See the following examples.

Custom widget shown
Figure 163. Custom widget shown

Custom widget hidden
Figure 164. Custom widget hidden