Module:Dochead: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
| Line 33: | Line 33: | ||
function p._dochead(args) | function p._dochead(args) | ||
local pagename = args["pagename"] | local pagename = args["pagename"] | ||
local header = args["header"] or "none" | |||
local is_metause = args["is_metause"] or false | local is_metause = args["is_metause"] or false | ||
Revision as of 05:18, 28 October 2025
| Introspection summary for Module:Dochead | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||||||||||||
No function descriptions were provided. The Lua code may have further information.
-- This module follows [[User:Ganaram inukshuk/Provisional style guide for Lua]]
local getArgs = require("Module:Arguments").getArgs
local ctg = require("Module:Category handler")._category_handler
local p = {}
-- Produces a hatnote that is placed on the top of a documentation page (either
-- template or module documentation) and can autodetect and categorize:
-- - FOR MODULES:
-- - whether a module has an accompanying template (overridable)
-- - whether a module is meant as a library for other modules
-- - FOR TEMPLATES:
-- - whether a template has an accompanying module (overridable)
-- - what functions from which modules are invoked
-- Options for specific types of templates and modules include:
-- - (TEMPLATES) whether it's a metatemplate
-- - (MODULES) whether it's a metamodule (used the same way as a metatemplate,
-- but direct use of module code is allowed)
-- Detect whether a page exists, where pagename is "Namespace:Title"
function p.page_exists(pagename)
local pagename = pagename or "Template:Dochead"
local title = mw.title.new(pagename)
if title and title.exists then
return true
else
return false
end
end
function p._dochead(args)
local pagename = args["pagename"]
local header = args["header"] or "none"
local is_metause = args["is_metause"] or false
end
function p.dochead(frame)
local args = getArgs(frame)
end
return p