TemplateData

Extension: TemplateData

all extensions

Overview
Description: Implement data storage for template parameters (using JSON)
State: stable Dependency: MediaWiki
Developer: Timo Tijhof, Moriel Schottlender, James Forrester, Trevor Parscal License: GPL v2+
Type: MediaWiki Category: Content Structuring
Edition: BlueSpice pro, BlueSpice farm, BlueSpice cloud Version: 4.1+
For more info, visit Mediawiki.


The extension TemplateData introduces a <templatedata> tag and an API which together allow editors to specify how templates should be invoked.

Not all data types that can be selected for a parameter, have any actual effect and are treated as "unknown":

Value Description
unknown standard setting

no visible effect

string intended for any string of plain text

no visible effect

line intended for content that should be forced to stay on one line

Effect:"line" prevents a parameter's input box from allowing new lines

content The "content" value is intended for wikitext of page content, for example, links, images or text formatting.

no visible effect

unbalanced-wikitext intended for wikitext that cannot stand alone, i.e. it lacks an opening or closing tag or refers to other parts of wikitext.

no visible effect

wiki-page-name intended for a page name on a wiki

Effect: Shows a suggestion dropdown menu containing a list of pages on the wiki, which can be selected. Namespaces can also be defined in the search. Additionally, it forces the input box content to stay on one line. It doesn't prevent a non-page from being inputted.

wiki-file-name intended for a locally hosted file name

no visible effect

wiki-template-name intended for the name of a template

Effect: Shows a suggestion dropdown menu containing a list of templates, which can be selected. Additionally, it forces the input box content to stay on one line. It doesn't prevent a non-template from being inputted.

wiki-user-name intended for a username on a wiki

Effect: Shows a suggestion dropdown menu containing a list of actual users' names, which can be selected. Additionally, it forces the input box content to stay on one line. It doesn't prevent a non-username from being inputted.

number intended for numerical values, including negative values and decimals.

no visible effect

boolean intended for a value that is either true, false or unknown. This is intended by the manual to be represented by a "1", "0" or blank value.

Effect: With the autovalue:0, a checkbox appears in the visual editor, which can be switched on and off.

date intended for a date in the YYYY-MM-DD format

no visible effect

url intended for a URL, with Internet protocol (e.g., "https://" or "//") included

Effect: It makes the input box display an external link icon (a square with arrow pointing out of it) in the left hand side of the box and makes the box glow red when the user clicks away without entering a URL value that includes a valid Internet protocol (e.g., "https://", "ftp://" or "//") followed by some text.