Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Difference between revisions of "Template:Assignment/Documentation"

From PCGamingWiki, the wiki about fixing PC games
m (updated documentation)
Line 1: Line 1:
;Description
+
'''Description'''
Use this template when a review code for the game is available.
 
  
;Arguments
+
This template is automatically called from [[Template:Infobox game]] if an assignment is available (set through [[PCGamingWiki:Assignments]]).
* <code>1</code> - place the end of the topic URL here, e.g.,
 
  
;Syntax
+
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.
<nowiki>{{Assignment|1}}</nowiki>
+
 
 +
'''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=
}}