For multiple modules with common elements we can define a configuration to apply to all modules, or all modules of a certain type. Maintaining a common config helps reduce the code repitition and allows you to change settings accross many widgets in one place. A config object can be passed as a second, optional argument to initializeWidgets.

var config = {
  generic: {
    theme: 'dark'
  }
};

pathfora.initializeWidgets([module, module2], config);
config object
Key Type Behavior
generic object optional setting which should apply to all modules initialized with this config
message object optional setting which should apply to all message modules initialized with this config
form object optional setting which should apply to all form modules initialized with this config
subscription object optional setting which should apply to all subscription modules initialized with this config
sitegate object optional setting which should apply to all gate modules initialized with this config

Example

Live Preview

General Config