Difference between revisions of "Template:Assignment/Documentation"
m (updated documentation) |
|||
Line 1: | Line 1: | ||
− | + | '''Description''' | |
− | |||
− | + | This template is automatically called from [[Template:Infobox game]] if an assignment is available (set through [[PCGamingWiki:Assignments]]). | |
− | |||
− | + | The call is simplistic in nature, and basically only validates whether the currently visited page have an assignment available to it. If it does, it automatically calls this template. Returned values aren't of important, and so both the '''more results text''' ("More...") and '''default''' ("No results") parameters is set to null to prevent additional text from being printed. | |
− | + | ||
+ | '''Syntax''' | ||
+ | |||
+ | This is the code that is calling the template through [[Template:Infobox game]]: | ||
+ | <pre><nowiki> | ||
+ | {{#cargo_query: | ||
+ | tables=Assignments | ||
+ | |fields=Game | ||
+ | |where=Game = "{{PAGENAME}}" AND Status = "available" | ||
+ | |limit=1 | ||
+ | |format=template | ||
+ | |template=Assignment | ||
+ | |more results text= | ||
+ | |default= | ||
+ | }}</nowiki></pre> | ||
<includeonly>[[Category:Tag templates]]</includeonly> | <includeonly>[[Category:Tag templates]]</includeonly> | ||
<noinclude>[[Category:Documentation templates]]</noinclude> | <noinclude>[[Category:Documentation templates]]</noinclude> |
Revision as of 01:04, 3 June 2019
Description
This template is automatically called from Template:Infobox game if an assignment is available (set through PCGamingWiki:Assignments).
The call is simplistic in nature, and basically only validates whether the currently visited page have an assignment available to it. If it does, it automatically calls this template. Returned values aren't of important, and so both the more results text ("More...") and default ("No results") parameters is set to null to prevent additional text from being printed.
Syntax
This is the code that is calling the template through Template:Infobox game:
{{#cargo_query: tables=Assignments |fields=Game |where=Game = "{{PAGENAME}}" AND Status = "available" |limit=1 |format=template |template=Assignment |more results text= |default= }}