Skip to main content

Enumeration: WidgetSourceType

Defines source options for widget configurations.

This enum specifies whether widget settings are defined locally for a specific product or inherited from global templates for consistency across products. The source affects both the widget's appearance and its maintainability.

Enumeration Members

GLOBAL_TEMPLATE

GLOBAL_TEMPLATE: "GLOBAL_TEMPLATE"

Widget inherits settings from a centralized template.

In GLOBAL_TEMPLATE mode, the widget's configuration comes from a centrally defined template shared across multiple products or blocks. This ensures consistency and simplifies maintenance through centralized definition.

Benefits:

  • Consistent appearance and behavior across products
  • Centralized maintenance - changes to the template affect all instances
  • Reduced configuration effort for new products
  • Better scalability for large product catalogs

Drawbacks:

  • Less flexibility for product-specific customization
  • Changes to templates affect all linked products
  • May require more complex template management

This mode is ideal for maintaining brand consistency, reducing maintenance overhead, and ensuring predictable behavior across a product catalog, especially for standard widget types used across many products.


LOCAL_SETTINGS

LOCAL_SETTINGS: "LOCAL_SETTINGS"

Widget uses locally defined settings specific to this product.

In LOCAL_SETTINGS mode, the widget's configuration is defined specifically for the current product or block, independent of any shared templates. This provides maximum flexibility to customize the widget for this specific application.

Benefits:

  • Full customization for the specific product context
  • Independence from changes to global templates
  • Ability to create unique interactions for special cases

Drawbacks:

  • Changes must be made individually for each instance
  • Can lead to inconsistency across products
  • Higher maintenance overhead for multi-product catalogs

This mode is ideal when the widget needs unique settings that don't apply to other products, or when the product has specialized requirements that differ from standard templates.