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.

package content.article;

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;

    /* Getters and Setters */

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

In the previous snippet, lines 19–26 implement 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.

package widgets;

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 {

            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) {
        return false;

In the previous snippet—

  • Lines 11–25 define a custom widget that appears under the content edit form.

  • Lines 27–30 hide the custom widget from the content edit page. See the following examples.

Custom widget shown
Figure 82. Custom widget shown

Custom widget hidden
Figure 83. Custom widget hidden