Difference between revisions of "Development:Seriesbox"

From PCGamingWiki, the wiki about fixing PC games
(test Cargo query)
(test comma workaround)
Line 1: Line 1:
<includeonly>{{#vardefine:series autohide|10}}{{#vardefine:series total|0}}{{{entries|{{{1}}}}}}<table class="pcgwikitable template-seriesbox {{#if:{{NAMESPACE}}||{{#ifexpr:{{#var:series total}} > {{#var:series autohide}} | mw-collapsible mw-collapsed}}}}" id="seriesbox" data-expandtext="{{#if:{{{title|}}}|{{{title}}}|{{#var:Series}}}}" data-collapsetext="{{#if:{{{title|}}}|{{{title}}}|{{#var:Series}}}}">{{#ifeq:{{NAMESPACE}}|Series|{{#vardefine:Series|{{PAGENAME}}}}}}
+
<includeonly>{{#vardefine:series query|{{#arraymap:{{PAGENAME}}|,|€€€€€|€€€€€|&#44;}}}}{{#vardefine:series autohide|10}}{{#vardefine:series total|0}}{{{entries|{{{1}}}}}}<table class="pcgwikitable template-seriesbox {{#if:{{NAMESPACE}}||{{#ifexpr:{{#var:series total}} > {{#var:series autohide}} | mw-collapsible mw-collapsed}}}}" id="seriesbox" data-expandtext="{{#if:{{{title|}}}|{{{title}}}|{{#var:Series}}}}" data-collapsetext="{{#if:{{{title|}}}|{{{title}}}|{{#var:Series}}}}">{{#ifeq:{{NAMESPACE}}|Series|{{#vardefine:Series|{{PAGENAME}}}}}}
 
<tr><th colspan="2" class="template-seriesbox-title">{{#if:{{NAMESPACE}}{{#ifexpr:{{#var:series total}} <= {{#var:series autohide}} | true}}|[[{{#if:{{{link|}}}|{{{link}}}|Series:{{#var:Series}}}}|{{#if:{{{title|}}}|{{{title}}}|{{#var:Series}}}}]]}}</th></tr><!--
 
<tr><th colspan="2" class="template-seriesbox-title">{{#if:{{NAMESPACE}}{{#ifexpr:{{#var:series total}} <= {{#var:series autohide}} | true}}|[[{{#if:{{{link|}}}|{{{link}}}|Series:{{#var:Series}}}}|{{#if:{{{title|}}}|{{{title}}}|{{#var:Series}}}}]]}}</th></tr><!--
 
-->{{#if:{{NAMESPACE}}||{{#ifexpr:{{#var:series total}} > {{#var:series autohide}} | <tr><td colspan="2" class="template-seriesbox-series-link">⤏ [[{{#if:{{{link|}}}|{{{link}}}|Series:{{#var:Series}}}}|Go to series page]]</td></tr>}}}}
 
-->{{#if:{{NAMESPACE}}||{{#ifexpr:{{#var:series total}} > {{#var:series autohide}} | <tr><td colspan="2" class="template-seriesbox-series-link">⤏ [[{{#if:{{{link|}}}|{{{link}}}|Series:{{#var:Series}}}}|Go to series page]]</td></tr>}}}}
Line 5: Line 5:
 
</table>{{#ifeq:{{NAMESPACE}}|Series|{{#cargo_query:
 
</table>{{#ifeq:{{NAMESPACE}}|Series|{{#cargo_query:
 
tables=Infobox_game
 
tables=Infobox_game
|where=Series HOLDS LIKE "{{PAGENAME}}"
+
|where=Series HOLDS LIKE "{{#var:series query}}"
 
|fields=Cover,_pageName,Developers,Publishers,Released,Available_on
 
|fields=Cover,_pageName,Developers,Publishers,Released,Available_on
 
|format=template
 
|format=template

Revision as of 02:14, 16 October 2021

Documentation for the above template (sometimes hidden from view).