Extension:NamespacePreload

The NamespacePreload extension lets you define text that should be preloaded on new pages in a certain namespace. This can be useful if you want to enforce some categorization style, or make all pages in a namespace use a certain template.

Pre-save transforms can be optionally applied before showing the edit page to the user. See: Configuration.

Configuration

 * $wgNamespacePreloadDoExpansion
 * Whether to expand templates of the preloaded text. Default is true.


 * $wgNamespacePreloadDoPreSaveTransform
 * Whether to apply pre-save transforms to the preloaded text before showing the edit page to the user. Default is false.

Usage
To define text that should be preloaded for a namespace first you have to determine the namespace ID. Please refer to the MediaWiki docs on how to do this. Once you obtain your namespace ID simply create a page by the following name:. For example, if you want to define a preload for the main namespace (ID 0), you should save it to this page:.

Template expansion
When $wgNamespacePreloadDoExpansion is set to true (the default value), all templates in the preload message will be expanded before displaying the edit form. You can disable that for all namespaces using this configuration setting.

You can also disable expansion selectively using a trick: let's say your preload message is. Create a new template, (let's call it Template:Lbraces) with the following content:. Then, in your preload text replace all occurences of  with , so instead of   you would have.

MediaWiki 1.39.x LTS Test Plan
The items listed here are general issues related to MediaWiki 1.39.x LTS. They are not addressing any issues that are specific to this extension.


 * Extension considered active for MediaWiki 1.39.x LTS