Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21f5550f8a2bdc9

Jump to content

Template:Format TemplateData/doc

From Wikipedia, the free encyclopedia

Usage

[edit]

Add the <templatedata> as usual, and then enclose it in a call to this template as the sole unnamed/positional parameter, like {{Format TemplateData|1=<templatedata>...</templatedata>}}.

Example output

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Format TemplateData in articles based on its TemplateData.

TemplateData for Format TemplateData

This template formats TemplateData nicely on documentation pages, hiding irrelevant information such as "Default: empty", and allows the values themselves to contain formatting. Remember that the users of VisualEditor will not see this formatting; it is important to test your new TemplateData in VisualEditor to check that it makes sense without. (For details of all of the available formatting, see the template's page.) Unless explicitly suspended with the |header=false parameter, the {{TemplateData header}} template is automatically shown before this table.
TemplateData information1
If the JSON parameter is not specified, this will be processed to extract the JSON. This option allows you to use the GUI TemplateData Editor, with the tradeoff of being a bit wonkier than when supplying just the actual JSON object inside them directly to the |JSON= parameter.
Default
See {{{JSON}}}, directly below
JSON TemplateData objectJSON
The code that would normally be wrapped in <templatedata> tags (not including the <templatedata> tags themselves. Links and basic text formatting should just work in the displayed table; see this template's page for full details. You should use HTML entities for special characters, such as <> (as &lt; and &gt;, respectively).

Formatting options

Wikilinks
These can be specified in the usual way. They will only be linked in the table; in the VisualEditor, only the title of the link will be displayed (as plain text).
External links
By just inserting the URL, these will be clickable in the table, and viewable in VisualEditor. If the URL is specified as [https://en.wikipedia.org/ Wikipedia], this will appear as Wikipedia in the table and https://en.wikipedia.org/ in the VisualEditor.
HTML entities
You may specify &lt;, &gt;, &amp;, &quot;, &nbsp; and any other valid XML or HTML entities.
HTML tags
These may be used, however they won't appear in the VisualEditor.
Noexport tags
Content wrapped in <noexport></noexport> tags will appear only in the table and never in the VisualEditor, making it useful for detailed explanations of parameters and any other content that is only useful with explicit formatting. Newline characters are respected here.
Templates
These may be transcluded, but be aware that their parsed output may make the JSON data they become part of to be invalid.
Default
If neither {{{1}}} nor {{{JSON}}} is given, the page's source code is scanned for a <templatedata> tag.
Show table of contentsTOC
When defined with a truthy Boolean value, a table of contents for the whole page is inserted between the template description and the parameter table.
Suggested values
  • 1
  • on
  • true
  • y
  • yes
Default
0
Hide TemplateData headerheader
When defined with a falsey Boolean value (such as no, off, etc.), this hides the display of the {{TemplateData header}} template above the table, however this is not generally recommended.
Suggested values
  • 0
  • false
  • n
  • no
  • off
Default
1
Suspend TemplateData outputlazy
When defined with any non-null value other than 0, any real TemplateData output is suspended. This may have the potential use case of multiple instances of this template on a page where only one should be active. To clarify, this means that this template will not be understood by the VisualEditor.
Suggested values
  • 1
  • on
  • true
  • y
  • yes
Default
0

Maintenance categories

[edit]

See also

[edit]