Module:LuaTemplateBlueprint: Difference between revisions
// via Wikitext Extension for VSCode Tag: Reverted |
No edit summary Tag: Manual revert |
||
| Line 14: | Line 14: | ||
* | * | ||
* Note on parameter handling: | * Note on parameter handling: | ||
* - Template parameters are extracted | * - Template parameters are extracted and normalized by TemplateHelpers.extractArgs() | ||
* - | * - This function handles case-insensitive parameter names for better user experience | ||
* - Parameters are accessible via args[paramName] regardless of case used in the template | * - Parameters are accessible via args[paramName] regardless of case used in the template | ||
]] | ]] | ||
| Line 330: | Line 330: | ||
-- Render the fields using TemplateStructure | -- Render the fields using TemplateStructure | ||
return TemplateStructure.renderFieldTable( | |||
fields, | |||
template.config.meta and template.config.meta.fieldOptions or {} | |||
) | ) | ||
end, | end, | ||
| Line 378: | Line 349: | ||
'StandardBlock_socialMedia', | 'StandardBlock_socialMedia', | ||
function() | function() | ||
return TemplateHelpers.renderSocialMediaBlock( | |||
args, | |||
return | template.config.meta and template.config.meta.socialMediaOptions or {} | ||
) | |||
end, | end, | ||
'', | '', | ||
| Line 931: | Line 903: | ||
local htmlIndex = 1 | local htmlIndex = 1 | ||
for property, value in pairs(propertyMapping) do | for property, value in pairs(propertyMapping) do | ||
propertyHtml[htmlIndex] = SemanticAnnotations.setSemanticProperty(property, value) | |||
propertyHtml[htmlIndex] = SemanticAnnotations. | |||
htmlIndex = htmlIndex + 1 | htmlIndex = htmlIndex + 1 | ||
end | end | ||
| Line 956: | Line 922: | ||
for property, value in pairs(providerResult) do | for property, value in pairs(providerResult) do | ||
if value and value ~= '' then | if value and value ~= '' then | ||
propertyHtml[htmlIndex] = SemanticAnnotations.setSemanticProperty(property, value) | |||
propertyHtml[htmlIndex] = SemanticAnnotations. | |||
htmlIndex = htmlIndex + 1 | htmlIndex = htmlIndex + 1 | ||
end | end | ||
| Line 1,071: | Line 1,031: | ||
end | end | ||
-- Extract arguments | -- Extract and normalize arguments | ||
local | local args = TemplateHelpers.extractArgs(frame) | ||
-- Run preprocessors | -- Run preprocessors | ||