Help:Extension:TemplateSandbox

This is user documentation for Template sandbox. 1>Special:MyLanguage/Extension:TemplateSandbox|Technical documentation for the TemplateSandbox extension is also available.

The Template sandbox extension makes it easier to test changes to 1>Special:MyLanguage/Help:Templates|templates and 2>Special:MyLanguage/Extension:Scribunto|Scribunto modules by allowing the changes to be previewed in existing pages without making the changes live for everyone.

Testing a change to a single template
When the extension is installed and enabled, a box titled "" will appear on the edit form underneath the "" and other buttons. If you enter the title of a page in the text field and use the adjacent "" button, the entered page will be previewed as it would appear if the template being edited were saved.

Testing a change to multiple templates
To test changes to multiple templates, first save sandbox versions as subpages of a page somewhere. For example, to test changes to Template:Example 1 and Template:Example 2, you might save the sandbox versions to User:Example/sandbox/Template:Example 1 and User:Example/sandbox/Template:Example 2</>.

Next, go to <tvar|1>Special:TemplateSandbox</>. Enter the title of the page to be previewed in the "<tvar|2>'</>" field, and the prefix used in the previous step (e.g. "<tvar|3>User:Example/sandbox</>") in the "<tvar|4>'</>" field.

To preview a particular revision of a page, enter the revision number in the "<tvar|1></>" field. To preview arbitrary wikitext, fill in both the "<tvar|2>'</>" (for 3>Help:Magic words</>|magic words such as <tvar|4> </>) and "<tvar|5>'</>" fields.

Note that the canonical name of the page must be used after the sandbox prefix; equivalent titles will not work. For example, <tvar|1>User:Example/sandbox/Template:example 1</> will not work, despite the fact that <tvar|2>Template:example 1</> is equivalent to <tvar|3>Template:Example 1</>.