Template:Wd/doc: Difference between revisions
Jump to navigation
Jump to search
wp>Thayts |
m 1 revision imported |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{High-use|162750}} | |||
{{ombox|text=You might want to use one of the user-friendly wrapper templates {{t|Wikidata}} and {{t|WikidataOI}} instead of invoking this module directly.}} | |||
{{Lua sidebar|template=Wikidata|module=Wd}} | |||
{{Wd/doc|prename=<nowiki/>#invoke:|prename_code=#invoke:|section==== Main class === | |||
== | The <code>main</code> command is always used alone and does not take any flags or arguments. It allows parent templates to pass on their parameters in the form of commands to this module. | ||
<table class="wikitable"> | |||
<tr> | |||
<th>Command</th> | |||
<th>Basic usage</th> | |||
<th>Description</th> | |||
</tr> | |||
<tr> | |||
<th style="text-align:left;"><code>main</code></th> | |||
<td>{{nowrap|{{tnull|<nowiki/>#invoke:{{lc:{{ROOTPAGENAME}}}}|main}}}}</td> | |||
<td>Intended for use by wrapper templates (around this module) to invoke one or more of the above commands, returning their respective output. | |||
<p>The parameters passed to the wrapper template are the ones that will be used by the module, e.g. {{tnull|wikidata|'''property'''|'''P1549'''}} → {{tnull|<nowiki/>#invoke:wd|main}} → {{tnull|<nowiki/>#invoke:wd|main|'''property'''|'''P1549'''}}.</p> | |||
<p>Therefore, any parameters set by the wrapper template itself will be discarded, e.g. {{tnull|wikidata|'''property'''|'''P1549'''}} → {{tnull|<nowiki/>#invoke:wd|main|{{color|red|qualifier}}|{{color|red|P1082}}|{{color|red|P585}}}} → {{tnull|<nowiki/>#invoke:wd|main|'''property'''|'''P1549'''}}.</p> | |||
</td> | |||
</tr> | |||
</table>}} | |||
}} | |||
< | |||
Latest revision as of 21:30, 14 August 2020
This template is used on approximately 163,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
You might want to use one of the user-friendly wrapper templates {{Wikidata}} and {{WikidataOI}} instead of invoking this module directly. |
Related pages |
---|
This template is used on approximately 163,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
You might want to use one of the user-friendly wrapper templates {{Wikidata}} and {{WikidataOI}} instead of invoking this module directly. |
Related pages |
---|
Template loop detected: Template:Wd/doc