Difference between revisions of "Module:Documentation"
create header text before tlinks
>Hasley (fix namespace) |
>Iniquity (create header text before tlinks) |
||
Line 1: | Line 1: | ||
--[[ | |||
Add your experimental module code here. | |||
--]] | |||
-- This module implements {{documentation}}. | -- This module implements {{documentation}}. | ||
Line 6: | Line 9: | ||
-- Get the config table. | -- Get the config table. | ||
local cfg = mw.loadData('Module:Documentation/config') | local cfg = mw.loadData('Module:Documentation/config/sandbox') | ||
local i18n = mw.loadData('Module:Documentation/i18n') | local i18n = mw.loadData('Module:Documentation/i18n') | ||
local p = {} | local p = {} | ||
Line 337: | Line 340: | ||
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' | -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' | ||
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' | -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' | ||
-- 'sandbox-notice-pagetype-template' --> '[[ | -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' | ||
-- 'sandbox-notice-pagetype-module' --> '[[ | -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' | ||
-- 'sandbox-notice-pagetype-other' --> 'sandbox page' | -- 'sandbox-notice-pagetype-other' --> 'sandbox page' | ||
-- 'sandbox-notice-compare-link-display' --> 'diff' | -- 'sandbox-notice-compare-link-display' --> 'diff' | ||
Line 609: | Line 612: | ||
sbox | sbox | ||
:addClass(message('header-div-class')) | :addClass(message('header-div-class')) | ||
:tag('div') | |||
:addClass(message('heading-div-class')) | |||
:wikitext(data.heading) | |||
local links = data.links | local links = data.links | ||
if links then | if links then | ||
Line 617: | Line 623: | ||
:wikitext(links) | :wikitext(links) | ||
end | end | ||
return tostring(sbox) | return tostring(sbox) | ||
end | end |