Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sandbox/Thayts/Wd/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== General class === The general class commands cannot be combined. {| class="wikitable" |- ! Type ! Command ! Returns ! Basic usage ! Description |- | style="text-align:right;" | I ! style="text-align:left;" | <code>label</code> | | {{nowrap|<code><nowiki>{{</nowiki>{{#ifeq:{{NAMESPACENUMBER}}|828|{{hash}}invoke:}}{{#titleparts:{{PAGENAME}}|3}}<nowiki>|label</nowiki>{{#if:{{{fetch|}}}|<nowiki>|fetch=</nowiki>{{{fetch}}}}}<nowiki>}}</nowiki></code>}} | Returns the label of the current item-entity or of a given entity if present. |- | colspan="5" | |- | style="text-align:right;" | II ! style="text-align:left;" | <code>title</code> | | {{nowrap|<code><nowiki>{{</nowiki>{{#ifeq:{{NAMESPACENUMBER}}|828|{{hash}}invoke:}}{{#titleparts:{{PAGENAME}}|3}}<nowiki>|title</nowiki>{{#if:{{{fetch|}}}|<nowiki>|fetch=</nowiki>{{{fetch}}}}}<nowiki>}}</nowiki></code>}} | Returns the title of the page connected to the current item-entity or to a given item-entity if such page exists. |- | colspan="5" | |- | style="text-align:right;" | III ! style="text-align:left;" | <code>description</code> | | {{nowrap|<code><nowiki>{{</nowiki>{{#ifeq:{{NAMESPACENUMBER}}|828|{{hash}}invoke:}}{{#titleparts:{{PAGENAME}}|3}}<nowiki>|description</nowiki>{{#if:{{{fetch|}}}|<nowiki>|fetch=</nowiki>{{{fetch}}}}}<nowiki>}}</nowiki></code>}} | Returns the description of the current item-entity or of a given entity if present. |- | colspan="5" | |- | rowspan="2" style="text-align:right;" | IV ! style="text-align:left;" | <code>alias</code> | <small>first match{{efn|Returns only a single value instead of multiple (if multiple values are present).|name=fmg}}</small> | {{nowrap|<code><nowiki>{{</nowiki>{{#ifeq:{{NAMESPACENUMBER}}|828|{{hash}}invoke:}}{{#titleparts:{{PAGENAME}}|3}}<nowiki>|alias</nowiki>{{#if:{{{fetch|}}}|<nowiki>|fetch=</nowiki>{{{fetch}}}}}<nowiki>}}</nowiki></code>}} | rowspan="2" | Returns an alias β or list of aliases β of the current item-entity or of a given entity if present. |- ! style="text-align:left;" | <code>aliases</code> | <small>all matches</small> | {{nowrap|<code><nowiki>{{</nowiki>{{#ifeq:{{NAMESPACENUMBER}}|828|{{hash}}invoke:}}{{#titleparts:{{PAGENAME}}|3}}<nowiki>|aliases</nowiki>{{#if:{{{fetch|}}}|<nowiki>|fetch=</nowiki>{{{fetch}}}}}<nowiki>}}</nowiki></code>}} |- | colspan="5" | |- | rowspan="2" style="text-align:right;" | V ! style="text-align:left;" | <code>badge</code> | <small>first match{{efn|name=fmg}}</small> | {{nowrap|<code><nowiki>{{</nowiki>{{#ifeq:{{NAMESPACENUMBER}}|828|{{hash}}invoke:}}{{#titleparts:{{PAGENAME}}|3}}<nowiki>|badge</nowiki>{{#if:{{{fetch|}}}|<nowiki>|fetch=</nowiki>{{{fetch}}}}}<nowiki>}}</nowiki></code>}} | rowspan="2" | Returns a badge β or list of badges β for the page connected to the current item-entity or to a given item-entity if such page exists. |- ! style="text-align:left;" | <code>badges</code> | <small>all matches</small> | {{nowrap|<code><nowiki>{{</nowiki>{{#ifeq:{{NAMESPACENUMBER}}|828|{{hash}}invoke:}}{{#titleparts:{{PAGENAME}}|3}}<nowiki>|badges</nowiki>{{#if:{{{fetch|}}}|<nowiki>|fetch=</nowiki>{{{fetch}}}}}<nowiki>}}</nowiki></code>}} |- | colspan="5" | |- | colspan="5" style="text-align:left;" | {{notelist}} |} {{#ifeq:{{NAMESPACENUMBER}}|828| === 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|<code><nowiki>{{#invoke:</nowiki>{{#titleparts:{{PAGENAME}}|3}}<nowiki>|main}}</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. <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'''<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> </tr> </table> |}}{{{section|}}}
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)