Difference between revisions of "Module:Wd/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Pppery
(Copying in code for main class from Module:Wd/doc, with some changes to fix problems I introduced via overzealous Template:Tnull conversions)
blackwiki>Pppery
(Fix a few more missing escapes)
Line 11: Line 11:
 
<td><code><nowiki>{{#invoke:</nowiki>{{lc:{{ROOTPAGENAME}}}}<nowiki>|main|command|P1}}</nowiki></code></td>
 
<td><code><nowiki>{{#invoke:</nowiki>{{lc:{{ROOTPAGENAME}}}}<nowiki>|main|command|P1}}</nowiki></code></td>
 
<td>Intended for use by wrapper templates (around this module) to invoke one or more of the above commands, returning their respective output.
 
<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. <code><nowiki>{{wikidata|</nowiki>'''property'''<nowiki>|</nowiki>'''P1549'''<nowiki>}}</nowiki></code> → <code><nowiki>{{#invoke:Wd|main}}</nowiki></code> → <code><nowiki>{{#invoke:Wd|main|</nowiki>'''property'''<nowiki>|</nowiki>'''P1549''''<nowiki>}}</nowiki></code>.</p>
+
<p>The parameters passed to the wrapper template are the ones that will be used by the module, e.g. <code><nowiki>{{wikidata|</nowiki>'''property'''<nowiki>|</nowiki>'''P1549'''<nowiki>}}</nowiki></code> → <code><nowiki>{{#invoke:Wd|main}}</nowiki></code> → <code><nowiki>{{#invoke:Wd|main|</nowiki>'''property'''<nowiki>|</nowiki>'''P1549'''<nowiki>}}</nowiki></code>.</p>
<p>Therefore, any parameters set by the wrapper template itself will be discarded, e.g. <code><nowiki>{{wikidata|</nowiki>'''property'''<nowiki>|</nowiki>'''P1549'''}} → <code><nowiki>{{#invoke:Wd|main|</nowiki>{{color|red|qualifier}}<nowiki>|</nowiki>{{color|red|P1082}}<nowiki>|</nowiki>{{color|red|P585}}'<nowiki>}}</nowiki></code> → <code><nowiki>{{#invoke:Wd|main|</nowiki>'''property'''<nowiki>|</nowiki>'''P1549''''<nowiki>}}</nowiki></code>.</p>
+
<p>Therefore, any parameters set by the wrapper template itself will be discarded, e.g. <code><nowiki>{{wikidata|</nowiki>'''property'''<nowiki>|</nowiki>'''P1549'''<code><nowiki>}}</nowiki></code> → <code><nowiki>{{#invoke:Wd|main|</nowiki>{{color|red|qualifier}}<nowiki>|</nowiki>{{color|red|P1082}}<nowiki>|</nowiki>{{color|red|P585}}'<nowiki>}}</nowiki></code> → <code><nowiki>{{#invoke:Wd|main|</nowiki>'''property'''<nowiki>|</nowiki>'''P1549''''<nowiki>}}</nowiki></code>.</p>
 
</td>
 
</td>
 
</tr>
 
</tr>
 
</table>}}
 
</table>}}

Revision as of 19:20, 12 October 2017

Template:Wd/doc