Adding a config variable
Fear featurism! Think twice if this is a generally needed switch or whether it's only needed by you personally. Every new config switch adds a little overhead to every request, and generally makes things more complicated.
Then follow these steps:
Add a default value of your variable to MoinMoin.config.multiconfig; in most cases, this should be a false value (i.e. one of None, [], {}, "") which triggers the old behaviour of the software, before you added your extension.
Add the code that supports the new variable, often in the form if request.cfg.myvar: do_my_new_thing().
- Maybe create a help page about the new feature.
Hints for automatic generation of pages
Moin can be used as a web application development framework and if your application needs to generate new pages, there are a few things to keep in mind:
use PageEditor and saveText to make new pages
since 1.1 there are new keyword parameters do_editor_backup and do_revision_backup - both defaulting to 1. Set them to 0 if you recreate pages often (like refreshing a web app status page once every few seconds) or your backup directory will be flooded with old version backups and editor backups.
if you need to automatically put ACLs on such a page, make sure that request.user has the right (admin) to do that. If your current user has not, but you need to do it nevertheless, then make a new request object using a more privileged SystemUser (make an account for it and give it more rights per acl_before) and give that request object the calls dealing with the new page.