Extension:HTMLTemplates
The HTMLTemplates extension allows admins to make raw html templates in the HTMLTemplate namespace, which other users can use. The templates use wikitext style paramaters (e.g. {{{1}}}
) which are automatically escaped. This is designed to be a safer alternative than Extension:Widgets, which has a lot of gotchas for non-technical users.
To use, simply create a page in the HTMLTemplate: namespace, then include it on a page with {{HTMLTemplate:Page name|parameter1= value of parameter}}
The extension is a work in progress, and not all contexts are properly supported yet.
Installation
- Download and move the extracted
HTMLTemplates
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HTMLTemplates - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'HTMLTemplates' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
User rights
You need the edithtmltemplates
right to edit HTMLTemplates. By default the editinterface group is given this.