Cert++
Close

Custom attribute editors for Page Designer components

Key Takeaway

To connect a custom attribute editor to a component attribute, set the attribute's type to custom in the component meta definition file. Then reference the editor's ID in the attribute's editor_definition element.

A custom attribute editor is a control you build yourself for a Page Designer component attribute when none of the preconfigured controls fit. Merchants use it to set the attribute's value in the Business Manager visual editor. The editor runs in the merchant's browser and exchanges values with Page Designer through events.

When to build a custom attribute editor

The type value of an attribute in a component's meta definition file sets the UI control that merchants use to set the attribute's value. For example:

  • file gives a file picker.
  • boolean gives a check box.
  • enum gives a select box.

When none of the preconfigured controls fit, build a custom attribute editor. Examples include:

  • Selecting store locations on a map
  • Choosing a text or background color
  • Placing a Favorite icon on a product tile
  • Choosing which Shop Now button to use
B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other B2C Commerce Developer studiers.