Difference between revisions of "Template:G2NG"

From ATLAS Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
<includeonly>{{#vardefine:delimiter|{{{delimiter|,}}{{#cargo_query:tables=GenericResources
+
<includeonly>{{#vardefine:delimiter|{{{delimiter|}}{{#cargo_query:tables=GenericResources
 
| format = template
 
| format = template
 
| template = Sandbox/G2NG/QueryTemplate
 
| template = Sandbox/G2NG/QueryTemplate
Line 6: Line 6:
 
| named args = yes
 
| named args = yes
 
}}</includeonly>
 
}}</includeonly>
 
<noinclude>{{Doc}}[[Category:Cargo query templates]]</noinclude>
<noinclude>
 
{{Doc}}
 
[[Category:Cargo query templates]]
 
</noinclude>
 

Revision as of 13:06, 1 August 2020

Template-info.png Documentation

G2NG: Generic to non-generic

Returns a comma-separated string with non-generic variants of a generic resource by querying Special:CargoTables/GenericResources.

Examples

Input Output
{{G2NG|Coal}} {Template:DelimiterTemplate:Sandbox/G2NG/QueryTemplate
{{G2NG|delimiter=&#124;|Coal}} {Template:DelimiterTemplate:Sandbox/G2NG/QueryTemplate
{{ItemList|listtype=none| {{G2NG|Coal}} }}

Note: ASCII number 124 is | (pipe/vertical bar).