Difference between revisions of "Template:Infobox company"

From PCGamingWiki, the wiki about fixing PC games
(updated most queries to use Cargo)
m (escape double quotes (", html entity: ") in the query using a backslash (\))
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<table class="vertical-navbox template-infobox" id="infobox-company">
 
<table class="vertical-navbox template-infobox" id="infobox-company">
<caption class="template-infobox-title">{{#if:{{{title|}}}|{{{title}}}|{{PAGENAME}}}}<includeonly>[[Category:Companies]]</includeonly></caption>
+
<caption class="template-infobox-title">{{#if:{{{title|}}}|{{{title}}}|{{PAGENAME}}}}<includeonly>[[Category:Companies]]</includeonly></caption><!--
 
+
-->{{#vardefine:pageName|{{#arraymap:{{PAGENAME}}|\s|€€€€€|€€€€€|_}}}}<!-- convert spaces ( ) to underscore (_)
 +
-->{{#vardefine:pageName|{{#arraymap:{{#var:pageName}}|&#34;|€€€€€|€€€€€|\"}}}}<!-- escape double quotes (", html entity: &#34;) in the query using a backslash (\)
 +
-->
 
{{#if: {{{cover|}}} |
 
{{#if: {{{cover|}}} |
 
<tr>
 
<tr>
Line 14: Line 16:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td class="template-infobox-info plainlinks" colspan="2">[[Website::{{{website}}}]]</td>
+
<td class="template-infobox-info plainlinks" colspan="2">{{{website|}}}</td>
 
</tr>
 
</tr>
 
}}
 
}}
Line 24: Line 26:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td class="template-infobox-info plainlinks" colspan="2">[[Parent company::Company:{{{parent}}}|{{{parent}}}]]</td>
+
<td class="template-infobox-info plainlinks" colspan="2">[[Company:{{{parent}}}|{{{parent}}}]]</td>
 
</tr>
 
</tr>
 
}}
 
}}
  
 
<!-- Subsidiaries -->
 
<!-- Subsidiaries -->
{{#ifexpr: {{#ask: [[Parent company::{{FULLPAGENAME}}]] |format=count }} > 0 |
+
{{#if: {{#cargo_query:
 +
tables=Company
 +
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Parent="Company:€€€€€"|\sOR\s}}
 +
|default=
 +
}} |
 
<tr>
 
<tr>
 
<th class="template-infobox-header" colspan="2">Subsidiaries</th>
 
<th class="template-infobox-header" colspan="2">Subsidiaries</th>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td class="template-infobox-info plainlinks" colspan="2">{{#ask: [[Parent company::{{FULLPAGENAME}}]] |format=list|sep=<br> }}</td>
+
<td class="template-infobox-info plainlinks" colspan="2">{{#cargo_query:
 +
tables=Company
 +
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Parent="Company:€€€€€"|\sOR\s}}
 +
|fields=_pageName
 +
|format=template
 +
|template=Infobox company/subsidiaries
 +
}}</td>
 
</tr>
 
</tr>
 
}}
 
}}
Line 52: Line 64:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td class="template-infobox-info plainlinks" colspan="2">[[Founded::{{{founded}}}]]</td>
+
<td class="template-infobox-info plainlinks" colspan="2">{{{founded|}}}</td>
 
</tr>
 
</tr>
 
}}
 
}}
Line 62: Line 74:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td class="template-infobox-info plainlinks" colspan="2">[[Defunct::{{{defunct}}}]]</td>
+
<td class="template-infobox-info plainlinks" colspan="2">{{{defunct|}}}</td>
 
</tr>
 
</tr>
 
}}
 
}}
Line 75: Line 87:
 
-->{{#cargo_query:
 
-->{{#cargo_query:
 
tables=Infobox_game
 
tables=Infobox_game
|where={{#arraymap:{{PAGENAME}},{{{formernames|}}}|,|€€€€€|Developers HOLDS LIKE "Company:€€€€€"|\sOR\s}}
+
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Developers HOLDS LIKE "Company:€€€€€"|\sOR\s}}
 
|fields=_pageName,Developers,Publishers,Engines,Released_PC_booter,Released_DOS,Released_Windows_3x,Released_Windows,Released_Mac_OS,Released_OS_X,Released_Linux,Released
 
|fields=_pageName,Developers,Publishers,Engines,Released_PC_booter,Released_DOS,Released_Windows_3x,Released_Windows,Released_Mac_OS,Released_OS_X,Released_Linux,Released
 
|format=template
 
|format=template
Line 86: Line 98:
 
-->{{#cargo_query:
 
-->{{#cargo_query:
 
tables=Infobox_game
 
tables=Infobox_game
|where={{#arraymap:{{PAGENAME}},{{{formernames|}}}|,|€€€€€|Publishers HOLDS LIKE "Company:€€€€€"|\sOR\s}}
+
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Publishers HOLDS LIKE "Company:€€€€€"|\sOR\s}}
 
|fields=_pageName,Developers,Publishers,Engines,Released_PC_booter,Released_DOS,Released_Windows_3x,Released_Windows,Released_Mac_OS,Released_OS_X,Released_Linux,Released
 
|fields=_pageName,Developers,Publishers,Engines,Released_PC_booter,Released_DOS,Released_Windows_3x,Released_Windows,Released_Mac_OS,Released_OS_X,Released_Linux,Released
 
|format=template
 
|format=template
Line 97: Line 109:
 
-->{{#cargo_query:
 
-->{{#cargo_query:
 
tables=Engine
 
tables=Engine
|where={{#arraymap:{{PAGENAME}},{{{formernames|}}}|,|€€€€€|Developer="Company:€€€€€"|\sOR\s}}
+
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Developer="Company:€€€€€"|\sOR\s}}
 
|fields=_pageName,Developer,Website,First_release,Latest_release
 
|fields=_pageName,Developer,Website,First_release,Latest_release
 
|format=template
 
|format=template
Line 108: Line 120:
 
-->{{#cargo_query:
 
-->{{#cargo_query:
 
tables=Infobox_game
 
tables=Infobox_game
|where={{#arraymap:{{PAGENAME}},{{{formernames|}}}|,|€€€€€|Porters_PC_booter HOLDS LIKE "Company:€€€€€"|\sOR\s}}
+
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Porters_PC_booter HOLDS LIKE "Company:€€€€€"|\sOR\s}}
 
|fields=_pageName,Developers,Publishers,Engines,Released_PC_booter=Released
 
|fields=_pageName,Developers,Publishers,Engines,Released_PC_booter=Released
 
|format=template
 
|format=template
Line 119: Line 131:
 
-->{{#cargo_query:
 
-->{{#cargo_query:
 
tables=Infobox_game
 
tables=Infobox_game
|where={{#arraymap:{{PAGENAME}},{{{formernames|}}}|,|€€€€€|Porters_DOS HOLDS LIKE "Company:€€€€€"|\sOR\s}}
+
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Porters_DOS HOLDS LIKE "Company:€€€€€"|\sOR\s}}
 
|fields=_pageName,Developers,Publishers,Engines,Released_DOS=Released
 
|fields=_pageName,Developers,Publishers,Engines,Released_DOS=Released
 
|format=template
 
|format=template
Line 130: Line 142:
 
-->{{#cargo_query:
 
-->{{#cargo_query:
 
tables=Infobox_game
 
tables=Infobox_game
|where={{#arraymap:{{PAGENAME}},{{{formernames|}}}|,|€€€€€|Porters_Windows_3x HOLDS LIKE "Company:€€€€€"|\sOR\s}}
+
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Porters_Windows_3x HOLDS LIKE "Company:€€€€€"|\sOR\s}}
 
|fields=_pageName,Developers,Publishers,Engines,Released_Windows_3x=Released
 
|fields=_pageName,Developers,Publishers,Engines,Released_Windows_3x=Released
 
|format=template
 
|format=template
Line 141: Line 153:
 
-->{{#cargo_query:
 
-->{{#cargo_query:
 
tables=Infobox_game
 
tables=Infobox_game
|where={{#arraymap:{{PAGENAME}},{{{formernames|}}}|,|€€€€€|Porters_Windows HOLDS LIKE "Company:€€€€€"|\sOR\s}}
+
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Porters_Windows HOLDS LIKE "Company:€€€€€"|\sOR\s}}
 
|fields=_pageName,Developers,Publishers,Engines,Released_Windows=Released
 
|fields=_pageName,Developers,Publishers,Engines,Released_Windows=Released
 
|format=template
 
|format=template
Line 152: Line 164:
 
-->{{#cargo_query:
 
-->{{#cargo_query:
 
tables=Infobox_game
 
tables=Infobox_game
|where={{#arraymap:{{PAGENAME}},{{{formernames|}}}|,|€€€€€|Porters_Mac_OS HOLDS LIKE "Company:€€€€€"|\sOR\s}}
+
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Porters_Mac_OS HOLDS LIKE "Company:€€€€€"|\sOR\s}}
 
|fields=_pageName,Developers,Publishers,Engines,Released_Mac_OS=Released
 
|fields=_pageName,Developers,Publishers,Engines,Released_Mac_OS=Released
 
|format=template
 
|format=template
Line 163: Line 175:
 
-->{{#cargo_query:
 
-->{{#cargo_query:
 
tables=Infobox_game
 
tables=Infobox_game
|where={{#arraymap:{{PAGENAME}},{{{formernames|}}}|,|€€€€€|Porters_OS_X HOLDS LIKE "Company:€€€€€"|\sOR\s}}
+
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Porters_OS_X HOLDS LIKE "Company:€€€€€"|\sOR\s}}
 
|fields=_pageName,Developers,Publishers,Engines,Released_OS_X=Released
 
|fields=_pageName,Developers,Publishers,Engines,Released_OS_X=Released
 
|format=template
 
|format=template
Line 174: Line 186:
 
-->{{#cargo_query:
 
-->{{#cargo_query:
 
tables=Infobox_game
 
tables=Infobox_game
|where={{#arraymap:{{PAGENAME}},{{{formernames|}}}|,|€€€€€|Porters_Linux HOLDS LIKE "Company:€€€€€"|\sOR\s}}
+
|where={{#arraymap:{{#var:pageName}},{{{formernames|}}}|,|€€€€€|Porters_Linux HOLDS LIKE "Company:€€€€€"|\sOR\s}}
 
|fields=_pageName,Developers,Publishers,Engines,Released_Linux=Released
 
|fields=_pageName,Developers,Publishers,Engines,Released_Linux=Released
 
|format=template
 
|format=template
Line 182: Line 194:
 
|outro=</table></div>[[Category:Porters]]
 
|outro=</table></div>[[Category:Porters]]
 
|default=
 
|default=
 +
}}</includeonly><noinclude>{{#cargo_declare:
 +
_table=Company
 +
|Website=URL
 +
|Parent=Page
 +
|Founded=Date
 +
|Defunct=Date
 +
}}</noinclude><includeonly>{{#cargo_store:
 +
_table=Company
 +
|Website={{{website|}}}
 +
|Parent=Company:{{{parent|}}}
 +
|Founded={{{founded|}}}
 +
|Defunct={{{defunct|}}}
 
}}</includeonly><noinclude>{{Documentation}}</noinclude>
 
}}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 00:54, 29 November 2021

Infobox company

This template defines the table "Company". View table.

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

Description

Used on pages below the "Company" namespace.

Syntax

{{Infobox company
|title        = 
|cover        = 
|website      = 
|parent       = 
|formernames  = 
|founded      = 
|defunct      = 
|wikipedia    = 
}}