Difference between revisions of "Template:Assignment"
(Not how it works.) |
m (Updated to reflect new assignment page etc) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <div class="notice notice- | + | <div class="notice plainlinks" id="notice-assignment"> |
− | <div class="notice-icon">[[File:Project icon. | + | <div class="notice-icon">[[File:Project icon.svg|link=|35px]]</div> |
− | <div class="notice-text"> | + | <div class="notice-text">An [[PCGamingWiki:Assignments|assignment]] for this game is currently available. You can read on how to apply for it [[PCGamingWiki:Assignments|here]].</div> |
− | </div><includeonly>[[Category: | + | </div><includeonly>[[Category:Assignments]]</includeonly><noinclude>{{Documentation}}</noinclude> |
Latest revision as of 00:39, 3 June 2019
- Description
This template is used to style the result an assignment is available (set through PCGamingWiki:Assignments) through the check at {{Assignment/checkAvailable}} which itself is called from the very top of {{Infobox game}}.
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 are not 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.
- Process
- {{Infobox game}} calls {{Assignment/checkAvailable}}
- {{Assignment/checkAvailable}} performs a Cargo query using
{{urlencode:{{PAGENAME}}|PATH}}
against the EncodedName column of the Cargo tableAssignments
to check if an assignment is available for the game. - If an assignment is available for the game, {{Assignment}} styles the banner shown on the page.