Module:TemplateStructure: Difference between revisions

// via Wikitext Extension for VSCode
Tag: Reverted
// via Wikitext Extension for VSCode
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
-- Module:TemplateStructure
--[[
-- A module for rendering templates block-based approach. Integrates with Module:ErrorHandling for centralized error reporting.
* Name: TemplateStructure
-- Provides block rendering functions for templates, including title blocks, divider blocks, and field tables.
* Author: Mark W. Datysgeld
* Description: Block-based template rendering module with centralized error reporting integration
* Notes: Block rendering functions for templates; title blocks; divider blocks; field tables; configurable CSS classes and attributes; ARIA support; container tag support for div wrappers; error handling integration
]]


local ErrorHandling = require('Module:ErrorHandling')
local ErrorHandling = require('Module:ErrorHandling')
Line 225: Line 228:
         return renderFieldTableOperation(fields, options)
         return renderFieldTableOperation(fields, options)
     end
     end
end
-- Renders a Page ID display div
function p.renderPageIdDisplay(pageId)
    if not pageId or pageId == '' then
        return ''
    end
    return string.format('<div class="page-id-display">PageID: %s</div>', tostring(pageId))
end
end


return p
return p