Best Practices for Developing a Dynamic Page

Follow best practices when developing a dynamic page.

  • Use the default_component_constructors property in the page meta definition file to populate a region on the page with a component. For example, specify that the main region of a Product List page contains a Product List grid component. When the merchant creates a Product List page in the Visual Editor, the main region is already populated with the Product List grid component. This approach helps the merchant to quickly create pages that use the appropriate components.
  • Be specific when naming a component, clearly indicating what kind of page the component is intended for. For example, name a component intended for a Product Detail page, Product Detail Grid. If the merchant uses a component that has attributes not specified by the aspect type assigned to the page, the component doesn't render correctly. By naming the components carefully, you can help merchants create pages with the appropriate components.
  • Be careful when creating a page type that supports more than one aspect type. Merchants must complete the extra and potentially confusing step of selecting a page type purpose during creation. Also, a page type generic enough to accommodate more than one aspect type can make only limited use of prepopulated components, providing the merchant less guidance during page design.