As of 11 Oct 2025, the Performance Measurement Network has been upgraded. If you experience any problems with the site, please report them to Wiki Webmaster.
Go to Joint Commission

Naming of Config.spec elements

when building your extension, there are several choices on where to place the elements in the $Foswiki::cfg hash:

Location Example Notes
Under the {Extensions} namespace $Foswiki::cfg{Extensions}{BathPlugin}{PlugType} This is the recommended location, It is recommended for all new extensions, and strongly recommended for non-Plugin type extensions (Contribs, Skins, etc).
Under the {Plugins} namespace $Foswiki::cfg{Plugins}{BathPlugin}{PlugType} This is traditionally where foswiki organizes all plugin settings.
Foswiki automatically populates two settings for Plugins (and only plugins):
  • {Plugins}...{Module}
  • {Plugins}...{Enable}
which must not be defined in the Config.spec file.
We no longer recommend using this namespace for custom settings.
Under the root namespace $Foswiki::cfg{BathPlugin} Not Recommended Historical extensions place settings under the root, it results in a very cluttered configuration.

Config namespace Rules going forward:

  • Existing extensions should probably not be restructured, to avoid configuration migration issues.
  • If developing a "Contrib" or "Skin", configuration should live under {Extensions}, even if it has a Plugin component.
  • If developing a "Plugin", it can use {Plugins} space but this is no longer recommended.
  • Never store settings at the root level.

Also, don't confuse the layout within Configure tabs with the hierarchy within the configuration hash. Settings are organized in the Configuration Tabs based upon the heading hierarchy of the Spec file, not the configuration hash structure. It is strongly recommended to stick to one location for settings for any extension. Try not to split settings into multiple areas of the configuration hash, except when the settings are "Extending" a core feature like the Store. All of these below settings will appear under the Extensions → BathPlugin tab. (but this is certainly not recommended).
---+ Extensions
---++ BathPlugin
$Foswiki::cfg{Plugins}{BathPlugin}{PlugType} = 'rubber';
$Foswiki::cfg{Extensions}{BathPlugin}{ToyType} = 'duckie';
$Foswiki::cfg{foobar} = 'some archaic root-level setting';

This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Performance Measurement Network? Send feedback
This website is using cookies. More info. That's Fine