Template:ID to name

Revision as of 18:02, 31 July 2019 by Teamtoto (talk | contribs) (now works with ~80% of all tables)

Basic implementation that searches the objectid in ItemsTable and returns the page name in plain text.

{{ID to name|Cyclopean Prism}}

output: Amaranthine prism

This defaults to Items table, but can search other tables given that they have their own ID in by specifying the table as the second argument:

{{ID to name|Human Corpse|Corpses}}

output:

Error 1054: Unknown column 'CorpseID' in 'WHERE'

Function: CargoSQLQuery::run Query: SELECT `Corpses`.`_pageID` AS `cargo_backlink_page_id_Corpses`,`Title` AS `Title` FROM `Corpses` WHERE CorpseID='Human Corpse' ORDER BY `Corpses`.`_pageID`,`Title` LIMIT 100