Module:TemplateHelpers: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
| Line 392: | Line 392: | ||
-- Generates a standard title block with configurable class and text | -- Generates a standard title block with configurable class and text | ||
-- Enhanced to support achievement integration with options | -- Enhanced to support achievement integration with options | ||
-- @deprecated Direct implementation moved to TemplateStructure.lua and AchievementSystem.lua | |||
function p.renderTitleBlock(args, titleClass, titleText, options) | function p.renderTitleBlock(args, titleClass, titleText, options) | ||
options = options or {} | options = options or {} | ||
-- | -- If achievement support is needed, use AchievementSystem | ||
if | if options.achievementSupport then | ||
local AchievementSystem = require('Module:AchievementSystem') | |||
local achievementClass = options.achievementClass or "" | |||
local achievementId = options.achievementId or "" | |||
local achievementName = options.achievementName or "" | |||
return AchievementSystem.renderTitleBlockWithAchievement( | |||
args, titleClass, titleText, achievementClass, achievementId, achievementName | |||
return | |||
) | ) | ||
else | else | ||
-- | -- Otherwise use the basic title block from TemplateStructure | ||
return | local TemplateStructure = require('Module:TemplateStructure') | ||
return TemplateStructure.renderTitleBlock(args, titleClass, titleText) | |||
end | end | ||
end | end | ||
| Line 461: | Line 456: | ||
return processedValue | return processedValue | ||
end | end | ||
-- Get property description from a property page | -- Get property description from a property page | ||
-- @param propertyName string The name of the property (e.g., "Has interview format") | -- @param propertyName string The name of the property (e.g., "Has interview format") | ||
-- @return string|nil The property description or nil if not found | -- @return string|nil The property description or nil if not found | ||
-- @deprecated Direct implementation moved to SemanticCategoryHelpers.lua | |||
function p.getPropertyDescription(propertyName) | function p.getPropertyDescription(propertyName) | ||
return SemanticCategoryHelpers.getPropertyDescription(propertyName) | |||
end | end | ||
| Line 609: | Line 569: | ||
-- Renders a standard divider block with optional label | -- Renders a standard divider block with optional label | ||
-- @deprecated Direct implementation moved to TemplateStructure.lua | |||
function p.renderDividerBlock(label) | function p.renderDividerBlock(label) | ||
local TemplateStructure = require('Module:TemplateStructure') | |||
return TemplateStructure.renderDividerBlock(label) | |||
end | end | ||
| Line 722: | Line 680: | ||
-- Creates a standardized configuration structure for template modules | -- Creates a standardized configuration structure for template modules | ||
-- @deprecated Direct implementation moved to ConfigRepository.lua | |||
function p.createStandardConfig(config) | function p.createStandardConfig(config) | ||
local ConfigRepository = require('Module:ConfigRepository') | |||
return ConfigRepository.createStandardConfig(config) | |||
end | end | ||