Creating Commerce Composer widget display groups
Create a widget display group to organize the widgets that are available within
the Add Widgets to Slots window. When business users select to add a widget to
a layout template slot, the user can use the widget display group to filter the widgets that show
within the Add Widgets to Slots window.
About this task
The Add Widgets to Slots window includes all of the widgets that a
store subscribes to and that are registered in the Commerce Composer framework. By default, these
widgets are organized into the following widget display groups for filtering the widgets that
display in the window at a time:
- AnyPage
- Set of widgets for use on any page. This group displays as the Widgets for any page option within the Add Widgets to Slots window.
- CategoryPage
- Set of widgets for use on category pages. This group displays as the Category page widgets option within the Add Widgets to Slots window.
- CatalogEntryPage
- Set of widgets for use on catalog entry pages. This group displays as the Catalog entry page widgets option within the Add Widgets to Slots window.
- SearchPage
- Set of widgets for use on a search results page. This group displays as the Search results page widgets option within the Add Widgets to Slots window.
If you are creating custom widgets, you might want to create a widget display group to include your custom widgets. If you are creating new page types to be managed with the Commerce Composer tool, you might want to create a widget display group for that page type. Your new group can include all of the widgets that a Management Center user can add to layout template slots for that new page type.
To create a widget display group, you must create a Management Center
object definition for the group and define the text properties for the group. After you define the
object definition for your new group and rebuild the LOBTools project, the Management Center
framework updates to include your group in the Commerce Composer tool. To create the source code
files for defining the widget display group object definition and text properties, you can use one
of the following options:
- Use an existing widget display group object definition as a model for creating the object definition for your new widget display group. The following steps outline the procedure for this option.
- Use the JET Transformation with a pattern input file to generate a new code package that
includes the source code files for your new widget display group. If you choose to use this method,
you must move or merge the generated files into your existing LOBTools project. When you are
creating the pattern input file for use with the JET Transformation, ensure that you include the
<widgetGroup>
element and corresponding attributes to generate the files for your widget display group. If you are only creating the source code files for a widget display group, do not include the<widgetDef>
element. You can use the JET Transformation to create the source code files for only a single widget display group when you run the transformation.For more information about using the JET Transformation to generate your source code files, see Generating Commerce Composer widget source code. For more information about moving the generated files into your LOBTools project, see Adding Management Center support for a Commerce Composer widget.
Procedure
- Start HCL Commerce Developer. Switch to the Enterprise Explorer view.
- Optional:
If the file structure does not exist, create the file structure to include your custom Commerce
Composer assets.
-
Create object definition file for your new widget display group.
-
Create or update a properties file to include the text for your widget display group.
- Register the text property for your widget display group within a resource bundle.
- If you created a resource bundle file to register your widget display group text properties, include the new resource bundle wherever it is used.
-
Include any appropriate widget within your new widget display group. For each widget that you
want to include within the group, update the object definition for the widget.
- Verify that your widget display group is available within the Add Widgets to Slots window in the Commerce Composer tool. Create a layout. When you select to add a widget to a template slot, ensure that you can filter by your new widget display group. Ensure that only the widgets that you included within this group display when you select your widget display group.