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:

  1. 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.

  2. Add the code that supports the new variable, often in the form if request.cfg.myvar: do_my_new_thing().

  3. 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:

MoinMoin: MoinDev/CommonTasks (last edited 2009-02-03 20:13:47 by ThomasWaldmann)