Manual:Creating pages with preloaded text

Preloading wikitext presents the user with a partially created page rather than a blank page, possibly with inline instructions for content organization.

This technique is especially useful when:
 * wiki users are willing to read and write simple wikitext (sometimes an issue on intranet installations of MediaWiki)
 * the wiki contains one or more categories of articles with lots of pro-forma text
 * the information that needs to be collected for such articles is a mix of structured data and free form text

Creating pages with preloaded text is a three step process:
 * 1) Design the preload file and its supporting templates
 * 2) Create pages for the preload files and supporting templates
 * 3) Set up the trigger to load the preload file

Design af preload fil
Den preload fil er ofte en artikel med en indlejret skabelon. For eksempel, hvis du ønsker en artikel for hver kunde eller afsætning kontakt kan du preload tekst, der ser nogenlunde sådan ud: <! - Indtast din kundes kontaktoplysninger efter lighedstegnet. Hvis du har brug for hjælp uploade visitkort billeder, se venligst Hjælp: Overførsel af visitkort billeder ->   ((CustomerContact | Antal = | BizcardImage = | Primær telefonnummer = | Adresse = )) 

Naming and documenting the preload file
Some extensions (see Extension:Boilerplate) have specific expectations as to where the preloaded text should be stored. Others leave that decision entirely up to the system administrator.

Naming and documenting the preload file takes some care because preload files don't always show up on "What links here" and so are at risk for accidental deletion (no info/no links - hard to tell from an article that got created and abandoned). For template based preload files, the following naming conventions may help avoid accidental deletion:


 * place template in
 * place preload file in

While documentation of regular templates is often presented on the template page itself (using noinclude tags), this is not possible for a page to be preloaded. Also categories and interlanguage links for the preload page itself are not possible without affecting the wikitext that is preloaded. The talk page has to be used for all these.

Loading the preload file
Preloading can be done with a preload parameter in a URL like http://en.wikipedia.org/wiki/Talk:Main_Page?action=edit&section=new&preload=Template:Foo which links to the edit box of a new page, preloaded with Template:Foo. There are also a number of extensions available to trigger your preload file, see below.

The wikitext of the source page, including noinclude parts and tags, but not includeonly tags, is preloaded into the editbox if the page or section does not exist yet. If the page or section to be edited already exists then only its wikitext is loaded, the preload command is ignored.

Notes:
 * Both the &lt;noinclude> and &lt;/noinclude> tags AND their content are preloaded, which means you can't categorize the source page or include some self-documentation: it'd be dumped into the preloaded text too.
 * The &lt;includeonly> and &lt;/includeonly> tags are stripped from the source page. If you need the preloaded text to provide includeonly tags, you can use


 * in your source: since the two middle tags will be stripped, the preloaded text will end up with just the &lt;includeonly> wanted.

Thus there is neither a complete inclusion nor a regular transclusion. See also bug 5210 (since 2006-03-09).

Parameter "preloadtitle" also provides initial content of the "Subject/headline" box, e.g.:

http://meta.wikimedia.org/w/wiki.phtml?title=Meta:Sandbox&action=edit&section=new&preloadtitle=pqr

It can also be edited before saving.


 * What's the difference between [ &preload] and [ &summary] (bug 17002) ? (summary is available on MediaWiki of fr-wikipedia)

Extensions
Extensions that trigger a preload file include:


 * Extension:Preloader
 * Extension:Inputbox, Extension:CreateBox,Extension:CreateArticle offer the most control over the loading process. Each of these extensions let you place a button somewhere in an article, typically in a user help page or the category page corresponding to the article.  You specify the name of the preload file as part of the button definition.
 *  Extension:MultiBoilerplate
 * Extension:BoilerplateSelection - preloaded text selected by pattern matching on article title. To set this up you create an array in your Manual:LocalSettings.php file.  This array associates regular expressions with preload article names.
 * Extension:Boilerplate - preloaded text for all articles irrespective of name or category. The preloaded text must be stored in the MediaWiki article  .  It will be loaded automatically whenever an article is created.
 * Extension:PreloadManager - Provides per-namespace specific text preloading upon page creation.

A few extensions also handle all three steps for you:


 * Extension:Add Article to Category - puts an add-an-article button on each category. When an article is created using this extension it will automatically contain the wiki text for including the article in that category, i.e.