Module:Dochead: Difference between revisions
No edit summary |
partial bugfix |
||
| Line 21: | Line 21: | ||
local cats = "" | local cats = "" | ||
if pagename: | if pagename:match("/doc$") then | ||
-- Documentation subpages | -- Documentation subpages | ||
if namespace == "Template" then | if namespace == "Template" then | ||
| Line 69: | Line 69: | ||
local has_template = iutils.page_exists(corr_template) | local has_template = iutils.page_exists(corr_template) | ||
if has_template then | if has_template then | ||
local wikitext = iutils.get_and_preprocess_content("Template", | local wikitext = iutils.get_and_preprocess_content("Template", corr_template) | ||
has_template = has_template and iutils.invocation_exists(wikitext, pagename) | has_template = has_template and iutils.invocation_exists(wikitext, pagename) | ||
end | end | ||
| Line 256: | Line 256: | ||
-- Categorization and output | -- Categorization and output | ||
local has_link = namespace == "Template" and | local has_link = namespace == "Template" and iutils.page_exists(corr_module) | ||
if result == "" then | if result == "" then | ||
return categorize(namespace, pagename, has_link) | return categorize(namespace, pagename, has_link) | ||