Configure the Content Field Widget

The Content Field widget renders one selected field of the current content item. A publication designer determines which field the widget is to render by setting the widget's Field option. The Field option is a collection field that offers the user a list of possible fields to choose from.

By default, the list contains all the fields in the default panel of the Story content type. This is sufficient for many purposes, since the default panels of the other content types supplied with the Widget Framework mostly have a subset of the fields available in the Story content type's default panel. Some content types, however, have fields in their default panel that don't appear in the Story default panel. You may also have created your own content types that have fields with other names in the default panel.

If you want to be able to render these additional fields using the Content Field widget, then you need to ensure that they appear in the list of options displayed by the Content Field widget's Field option.

You can add the fields of content types other than Story to the Content Field widget's Field option by adding a widget.contentField.contentType section parameter to the root section of one (or more) of the site publications at your installation. The value of the parameter should be a comma-separated list of content-type names. For example:

widget.contentField.contentType=myImprovedStory,myEvenBetterStory

Field names from all of the content types you specify will then be added to the Field option's list. You only need to add the widget.contentField.contentType section parameter to one of your publications as its effect is global. You can add it to several publications, but you can't control its effect by doing so. All your publications are searched for the presence of this parameter, and fields from all the content types you specify in the various publications are added to the Field option's list.

Please note that:

  • You can only add the widget.contentField.contentType section parameter to a site publication – not to a blueprint. Adding this parameter to a blueprint has no effect.

  • The content type names you add to widget.contentField.contentType must be the actual name attributes as specified in the content-type resource, not the labels displayed in Content Studio.

  • If you are wondering which Story panel is the default panel, it's the one labeled General in Content Studio. All content types have a panel with the internal name default, but some of them have a different label.

  • You can only add fields from a content item's default panels. Fields on other panels cannot be rendered by the Content Field widget.