Module:AttachingTemplates

local util_args = require('Module:ArgsUtil') local util_cargo = require("Module:CargoUtil") local util_html = require("Module:HtmlUtil") local util_map = require('Module:MapUtil') local util_table = require("Module:TableUtil") local util_text = require("Module:TextUtil") local util_vars = require("Module:VarsUtil") local i18n = require("Module:I18nUtil") local lang = mw.getLanguage('en') local h = {} local p = {} function p.main(frame) -- can't put includeonly in system message so just kill all output there or it'll error if mw.title.getCurrentTitle.nsText == "MediaWiki" then return end local result = util_cargo.getOrderedList({		tables = 'CargoAttachments',		fields = 'TemplateName',		where = ('CargoTable="%s"'):format(util_vars.getVar('table'))	}, 'TemplateName') local output = mw.html.create('ul') for _, v in ipairs(result) do		output:tag('li'):wikitext(frame:expandTemplate{			title = "tl",			args = { v }		}) end return output end return p