Module:T-Person: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
| Line 45: | Line 45: | ||
title = true, | title = true, | ||
logo = true, | logo = true, | ||
portraitCarousel = true, | |||
fields = true, | fields = true, | ||
socialMedia = true, | socialMedia = true, | ||
| Line 59: | Line 60: | ||
template.config.blockSequence = { | template.config.blockSequence = { | ||
'title', | 'title', | ||
'portraitCarousel', | |||
'logo', | 'logo', | ||
'fields', | 'fields', | ||
| Line 74: | Line 76: | ||
-- Safely load element modules with ErrorHandling.safeRequire, then register them via Blueprint.addElementToTemplate(template, 'example') | -- Safely load element modules with ErrorHandling.safeRequire, then register them via Blueprint.addElementToTemplate(template, 'example') | ||
-- if template.features. | -- Register the portrait carousel element | ||
if template.features.portraitCarousel then | |||
local ElementPortraitCarousel = ErrorHandling.safeRequire(errorContext, | |||
'Module:ElementPortraitCarousel', false) | |||
if ElementPortraitCarousel then | |||
Blueprint.registerElement(ElementPortraitCarousel.elementName, ElementPortraitCarousel) | |||
Blueprint.addElementToTemplate(template, 'portraitCarousel') | |||
end | |||
end | |||
-- SPECIAL SEMANTIC MAPPINGS GO HERE | -- SPECIAL SEMANTIC MAPPINGS GO HERE | ||