Module:T-TLD: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Tag: Reverted
Line 8: Line 8:
local ErrorHandling = require('Module:ErrorHandling')
local ErrorHandling = require('Module:ErrorHandling')
local LinkParser = require('Module:LinkParser')
local LinkParser = require('Module:LinkParser')
local mw = mw


-- Blueprint possible default: Module-level cache for lazy-loaded modules
-- Blueprint possible default: Module-level cache for lazy-loaded modules
Line 176: Line 177:
         "render",
         "render",
         function()
         function()
             return template.render(frame)
            local titleObj = mw.title.getCurrentTitle()
            local pageName = titleObj and titleObj.text or ''
            local lc = pageName ~= '' and (pageName:sub(1,1):lower() .. pageName:sub(2)) or ''
            local dt = string.format('<span>{{DISPLAYTITLE:%s}}</span>\n[[Category:Lowercase Title]]\n', lc)
             return dt .. template.render(frame)
         end,
         end,
         ErrorHandling.getMessage("TEMPLATE_RENDER_ERROR"),
         ErrorHandling.getMessage("TEMPLATE_RENDER_ERROR"),