Extensie:TemplateSandbox
- This is technical documentation of the extension. There is also a user documentation.
![]() Release status: stabiel |
|
---|---|
![]() |
|
Implementatie | Speciale pagina , Pagina actie |
Beschrijving | Preview pages using sandboxed templates |
Auteur(s) | Brad Jorsch (Anomieoverleg) |
Laatste versie | 1.1.0 (continuous updates) |
Compatibiliteit beleid | Snapshots releases samen met MediaWiki. Master is niet achterwaarts compatibel. |
MediaWiki | 1.35+ |
PHP | 7.0+ |
Licentie | GNU General Public Licentie 2.0 of hoger |
Download | |
|
|
Downloads kwartaal | 65 (Ranked 107th) |
Publieke wiki's die het gebruiken | 1,040 (Ranked 233rd) |
Vertaal de TemplateSandbox extensie indien beschikbaar op translatewiki.net | |
Problemen | Open taken · Rapporteer een bug |
The TemplateSandbox extension adds the ability to preview a page using sandboxed versions of templates, allowing for easy testing before making the sandbox code live. It also works with Scribunto modules.
Installation
- Download en plaats de bestanden in de map
TemplateSandbox
in de mapextensions/
. - Voeg de volgende code onderaan aan het bestand
LocalSettings.php
toe:wfLoadExtension( 'TemplateSandbox' );
Klaar – Navigeer naar Special:Version op de wiki om te controleren dat de extensie geïnstalleerd is.
Configuration
- Parameters
$wgTemplateSandboxEditNamespaces
- Namespaces in which to show the "Preview page with this template" box below the edit form.NS_TEMPLATE
by default. Can be expanded to all namespaces by individual users using advancedtemplatesandbox.js.
Usage
The extension adds a new special page, Special:TemplateSandbox. To preview a page using sandboxed templates, do the following:
- Copy the templates to be tested under a common prefix. For example, you might copy
Template:Foo
toUser:Example/sandbox/Template:Foo
. Alternatively, you might createUser:Example/sandbox/Template:Foo
as a redirect toTemplate:Foo/sandbox
. - Go to Special:TemplateSandbox. Fill in the page or revision to be rendered, and the prefix you chose in step 1. It is possible to specify multiple prefixes (a prefix search path) by separating them using vertical bars, e.g.
User:Example/sandbox1|User:Example/sandbox2
. - Click View.
The extension also adds a box at the bottom of the edit form for pages in the namespaces configured in $wgTemplateSandboxEditNamespaces
.
This allows for previewing some other page as it would appear were the template being edited saved with the current contents of the edit form.
The box can be forced to appear in the edit form for any page by adding the query parameter wpTemplateSandboxShow
to the URL.
See also
- User:Jackmcbarn/advancedtemplatesandbox.js — A MediaWiki user script that enables use of TemplateSandbox for all pages.
- Help:ExpandTemplates
- Extension:SandboxLink
- Extension:Scribunto − This extension also allows for sandboxing Scribunto modules.
![]() | Deze uitbreiding wordt gebruikt op een of meerdere Wikimedia projecten. Dit betekent waarschijnlijk dat de uitbreiding stabiel is en goed werkt op dergelijke vaak bezochte websites. Zoek op de naam van deze uitbreiding in Wikimedia's CommonSettings.php en InitialiseSettings.php om te zien waar deze is geïnstalleerd. Een volledige lijst van de uitbreidingen die geïnstalleerd zijn op een bepaalde wiki kan worden gevonden op de Special:Version pagina van de wiki. |
![]() | Deze uitbreiding is onderdeel van de volgende pakketten en/of beschikbaar op de volgende wiki-families: Er kunnen wiki farms/hosts zijn die deze extension bevatten, maar hier niet genoemd worden. Controleer het altijd bij uw wiki farms/hosts of bundel. |
Categories:
- Stable extensions/nl
- Special page extensions/nl
- Page action extensions/nl
- GPL licensed extensions/nl
- Extensions in Wikimedia version control/nl
- APIGetAllowedParams extensions/nl
- AlternateEditPreview extensions/nl
- ApiMakeParserOptions extensions/nl
- EditPage::importFormData extensions/nl
- EditPage::showStandardInputs:options extensions/nl
- All extensions/nl
- Extensions used on Wikimedia/nl
- Extensions included in Miraheze/nl
- Extensions included in WikiForge/nl