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:

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';