Module:Documentation: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(fix env.templateTitle value when title is in a talk namespace) |
(change docpageRoot to docpageBase, as usually base and root mean different things with respect to titles) |
||
Line 172: | Line 172: | ||
-- env.subjectSpace - the number of the title's subject namespace. |
-- env.subjectSpace - the number of the title's subject namespace. |
||
-- env.docSpace - the number of the namespace the title puts its documentation in. |
-- env.docSpace - the number of the namespace the title puts its documentation in. |
||
-- env. |
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. |
||
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. |
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. |
||
-- |
-- |
||
Line 239: | Line 239: | ||
docpage = docname |
docpage = docname |
||
else |
else |
||
docpage = env. |
docpage = env.docpageBase .. '/' .. message('doc-subpage') |
||
end |
end |
||
return mw.title.new(docpage) |
return mw.title.new(docpage) |
||
Line 250: | Line 250: | ||
-- 'sandbox-subpage' --> 'sandbox' |
-- 'sandbox-subpage' --> 'sandbox' |
||
--]] |
--]] |
||
return mw.title.new(env. |
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) |
||
end |
end |
||
Line 259: | Line 259: | ||
-- 'testcases-subpage' --> 'testcases' |
-- 'testcases-subpage' --> 'testcases' |
||
--]] |
--]] |
||
return mw.title.new(env. |
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) |
||
end |
end |
||
Line 288: | Line 288: | ||
end |
end |
||
function envFuncs. |
function envFuncs.docpageBase() |
||
-- The base page of the /doc, /sandbox, and /testcases subpages. |
-- The base page of the /doc, /sandbox, and /testcases subpages. |
||
-- For some namespaces this is the talk page, rather than the template page. |
-- For some namespaces this is the talk page, rather than the template page. |