Difference between revisions of "Template:Infobox company"
(changed PAGENAMEE to PAGENAME for Engine query (fixes missing engine results)) |
m ({{#var:formerNames}}) |
||
(16 intermediate revisions by the same user 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}}|"|€€€€€|€€€€€|\"}}}}<!-- escape double quotes (", html entity: ") in the query using a backslash (\) | ||
+ | -->{{#vardefine:pageNameSpaces|{{#arraymap:{{PAGENAME}}|"|€€€€€|€€€€€|\"}}}}<!-- page name with spaces (needed for subsidaries and engine queries), but with escaped double quotes (", html entity: ") in the query using a backslash (\) | ||
+ | -->{{#vardefine:formerNames|{{{formernames|}}}}} | ||
{{#if: {{{cover|}}} | | {{#if: {{{cover|}}} | | ||
<tr> | <tr> | ||
Line 31: | Line 34: | ||
{{#if: {{#cargo_query: | {{#if: {{#cargo_query: | ||
tables=Company | tables=Company | ||
− | |where={{#arraymap:{{ | + | |where={{#arraymap:{{#var:pageNameSpaces}},{{#var:formerNames}}|,|€€€€€|Parent="Company:€€€€€"|\sOR\s}} |
|default= | |default= | ||
}} | | }} | | ||
Line 40: | Line 43: | ||
<td class="template-infobox-info plainlinks" colspan="2">{{#cargo_query: | <td class="template-infobox-info plainlinks" colspan="2">{{#cargo_query: | ||
tables=Company | tables=Company | ||
− | |where={{#arraymap:{{ | + | |where={{#arraymap:{{#var:pageNameSpaces}},{{#var:formerNames}}|,|€€€€€|Parent="Company:€€€€€"|\sOR\s}} |
|fields=_pageName | |fields=_pageName | ||
|format=template | |format=template | ||
Line 49: | Line 52: | ||
<!-- Former names --> | <!-- Former names --> | ||
− | {{#if: {{ | + | {{#if: {{#var:formerNames}}| |
<tr> | <tr> | ||
<th class="template-infobox-header" colspan="2">Previous names</th> | <th class="template-infobox-header" colspan="2">Previous names</th> | ||
</tr> | </tr> | ||
− | {{#arraymaptemplate:{{ | + | {{#arraymaptemplate:{{#var:formerNames}}|Infobox company/fn|,|}} |
}} | }} | ||
Line 80: | Line 83: | ||
<tr> | <tr> | ||
<td class="template-infobox-icons" colspan="2"><!-- | <td class="template-infobox-icons" colspan="2"><!-- | ||
− | -->{{#if: {{{wikipedia|}}} | <div title="{{ | + | -->{{#if: {{{wikipedia|}}} | <div title="{{PAGENAME}} at Wikipedia" class="template-infobox-icon svg-icon svg-18 infobox-wikipedia">[[Wikipedia:{{{wikipedia}}}| ]]</div> }}</td> |
</tr> | </tr> | ||
}}<span style="display:none">{{#default_form:Company page}}</span></table><includeonly><!-- | }}<span style="display:none">{{#default_form:Company page}}</span></table><includeonly><!-- | ||
− | -->{{ | + | -->{{Tocbox}}{{#ifeq: {{{listgames|true}}} | false | | {{Infobox company/query}} }}<!-- |
− | + | --></includeonly><noinclude>{{#cargo_declare: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }}<!-- | ||
− | --> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
_table=Company | _table=Company | ||
|Website=URL | |Website=URL |
Latest revision as of 17:53, 2 October 2022
This template defines the table "Company". View table.
Description
Used on pages below the "Company" namespace.
Also automatically populates lists of games the company is involved in, unless disabled using listgames=false
. If the lists are disabled in this template call, add {{Infobox company/query}} call somewhere further down the page to have the lists appear there instead.
Syntax
{{Infobox company |title = |cover = |website = |parent = |formernames = |founded = |defunct = |wikipedia = |listgames = true }}