Module:TemplateHelpers: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
| Line 390: | Line 390: | ||
-- Block Generation Helpers | -- Block Generation Helpers | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
-- @deprecated See TemplateStructure.renderTitleBlock and AchievementSystem.renderTitleBlockWithAchievement | |||
function p.renderTitleBlock(args, titleClass, titleText, options) | |||
options = options or {} | |||
-- If achievement support is needed, use AchievementSystem | |||
if options.achievementSupport then | |||
return require('Module:AchievementSystem').renderTitleBlockWithAchievement( | |||
args, titleClass, titleText, | |||
options.achievementClass or "", | |||
options.achievementId or "", | |||
options.achievementName or "" | |||
) | |||
else | |||
-- Otherwise use the basic title block from TemplateStructure | |||
return require('Module:TemplateStructure').renderTitleBlock(args, titleClass, titleText) | |||
end | |||
end | |||