Difference between revisions of "Module:Documentation"

No change in size ,  02:50, 23 January 2014
change docpageRoot to docpageBase, as usually base and root mean different things with respect to titles
>Mr. Stradivarius
(fix env.templateTitle value when title is in a talk namespace)
>Mr. Stradivarius
(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.docpageRoot - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- 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.docpageRoot .. '/' .. message('doc-subpage')
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.docpageRoot .. '/' .. message('sandbox-subpage'))
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.docpageRoot .. '/' .. message('testcases-subpage'))
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
end
Line 288: Line 288:
end
end


function envFuncs.docpageRoot()
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.
Anonymous user