§
![]() | This module is rated as beta, and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected. |
Usage
Links and formats article titles in body text for use on disambiguation or other pages. Used by templates {{fti}}, {{ftq}}, and {{ftqi}}.
- Function p._italic italicizes the non-parenthetical portion (or, optionally, only the parenthetical portion) of its argument (typically a page name).
- Function p._quotes encloses the non-parenthetical portion (or, optionally, only the parenthetical portion) of its argument (typically a page name) in quotation marks.
{{#invoke:Format title|function_name|article_title}}
local getArgs = require('Module:Arguments').getArgs
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame)
return p[funcName](args)
end
end
local p = {}
p.func1 = makeInvokeFunc('_func1')
function p._func1(args)
-- Code for the first function goes here.
end
p.func2 = makeInvokeFunc('_func2')
function p._func2(args)
-- Code for the second function goes here.
end
return p