layoutWidgetRelationship input file
Use a layoutWidgetRelationship input file to add a container and widgets to a layout, default layout, or template.The following illustration shows sample data in this input file that adds a container with nine widgets to a layout called
SampleHomePageLayout:For samples that demonstrate how to use this input file in different load scenarios, see:
We can extract data for the relationships between widgets and layouts, default layouts, and templates with the Data Extract utility to create a layoutWidgetRelationship.csv file that we can load with the Data Load utility. For example, to copy or move layouts between stores or instances, such as for creating one or more test environments. The sample configuration files provided for you to use with the Data Extract utility, extract widget relationship data from the following database tables:
For more information about extracting Commerce Composer data, see:
- Extracting Commerce Composer data with the Data Extract utility
- Sample: Extracting Commerce Composer widgets
- Sample: Extracting Commerce Composer layouts
Definitions
- (Integer) The internal reference number for the layout or template to which we are adding a container and widgets, for example, 50001. Either this field or the LayoutName field (see next column) is required.
Note: The sample CSV file does not include this column; the sample demonstrates the use of the LayoutName to uniquely identify the layout. Maps to:
- PAGELAYOUT.PAGELAYOUT_ID
- PLWIDGET.PAGELAYOUT_ID
- (String) The external reference name for the layout or template to which we are adding a container and widgets, for example, SampleHomePageLayout. Either this field or the LayoutUniqueID field (see previous column) is required.
Maps to: PAGELAYOUT.NAME
- (Integer) The internal reference number for the container. Either this field or the AdminName field (see next column) is required. We can look up this value in PLWIDGETDEF table, PLWIDGETDEF_ID column.
Note: The sample CSV file does not include this column; the sample demonstrates the use of the AdminName field to uniquely identify the container.
Maps to: PLWIDGET.PLWIDGET_ID
- (String) The administrative name for the container in this layout or template. This name is defined in the WidgetDefIdentifier column of the registerWidgetdef input file that was used to load the container. Either this field or the UniqueID field (see previous column) is required.
Maps to: PLWIDGET.ADMINNAME
- (String) The external reference name for the widget to include in the layout or template, for example, EMarketingSpot or ContentCarousel. This identifier is defined in the WidgetDefIdentifier column of the registerWidgetdef input file that was used to load the widget.
Maps to: PLWIDGETDEF.IDENTIFIER
- (String) A name to identify this widget within this specific layout or template, for example, HeaderLeftBannerContentWidget. This name is displayed in the Commerce Composer tool to help business users understand the purpose of the widget within this specific layout. We can use any name that we want.
Maps to: PLWIDGET.ADMINNAME
- (Double) A number to define the order in which to stack this widget relative to other widgets that are displayed in the same slot, starting with zero (0). For example, if you add three widgets to slot 1, use this column to specify the sequence number for each widget. In the following sample excerpt from an input file, the HeroAdOnCategoryPage widget is displayed at the top of Slot 1, followed by the SecondAdOnCategoryPage widget, and the ThirdAdOnCategoryPage widget:
ChildWidgetAdminName WidgetSequence SlotID HeroAdOnCategoryPage 0 1 SecondAdOnCategoryPage 1 1 ThirdAdOnCategoryPage 2 1
For slots that contain only one widget, specify 0.
Maps to: PLWIDGETREL.SEQUENCE
- (String) The internal identifier of the slot into which we are adding the widget.
Maps to: PLWIDGET.SLOTID
- (String) A flag that indicates whether to delete the relationship for this layout. Specify 1 to delete the row.
Related concepts
Layouts, layout templates, and default layouts
Commerce Composer layout architecture
Commerce Composer layout template architecture
Widgets for Commerce Composer
Commerce Composer widget library
Related tasks
Creating Commerce Composer widgets
Extracting Commerce Composer data with the Data Extract utility
Related reference
Commerce Composer samples
Sample: Extracting Commerce Composer widgets
Sample: Extracting Commerce Composer layouts
Sample: Extracting Commerce Composer data
Commerce Composer object input file definitions