Template:ID to name: Difference between revisions

274 bytes removed ,  15:55, 28 October 2019
replaced with module to use aliases properly
(Created page with "<includeonly> {{#cargo_query:table={{{2|ItemsTable}}}|where={{#switch: {{{2|ItemsTable}}}| ItemsTable =ObjectID|Mods=ModID|Mutations=MutationID|ObjectID}}='{{{1|}}}'|format=te...")
 
(replaced with module to use aliases properly)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>{{#invoke:Favilink Utility|IDtoname
{{#cargo_query:table={{{2|ItemsTable}}}|where={{#switch: {{{2|ItemsTable}}}| ItemsTable =ObjectID|Mods=ModID|Mutations=MutationID|ObjectID}}='{{{1|}}}'|format=template|template=single query result}}</includeonly><noinclude>[[Category:Templates]]
|{{{1}}}}}</includeonly><noinclude>[[Category:ID to name Templates]]
Basic implementation that searches the objectid in ItemsTable and returns the page name in plain text.
Basic implementation that searches the objectid in ItemsTable and returns the page name in plain text.


Line 9: Line 9:
{{ID to name|Cyclopean Prism}}
{{ID to name|Cyclopean Prism}}


This defaults to Items table, but can search other tables given that they have their own value that stores object id if the table is specified(Not fully implemented)
This uses the GeneralData Table,
 
</noinclude>
</noinclude>