Difference between revisions of "Module:Page"

From blackwiki
Jump to navigation Jump to search
blackwiki>Liangent
blackwiki>Darklama
(simplify and fix pageid passing)
Line 1: Line 1:
---- This module is meant to allow the goodies listed in
+
---- This module is meant to allow the goodies listed in
---- http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Title_objects
+
---- http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Title_objects
---- to be accessed by people who don't want to program a Lua module.
+
---- to be accessed by people who don't want to program a Lua module.
---- Usage is:  {{#invoke:Page|(function)|parameters}}
+
---- Usage is:  {{#invoke:Page|(function)|parameters}}
---- (function) is one of the function names from the table above:
+
---- (function) is one of the function names from the table above:
---- id, interwiki, namespace, fragment, nsText, subjectNsText, text, prefixedText, fullText ...
+
---- id, interwiki, namespace, fragment, nsText, subjectNsText, text, prefixedText, fullText ...
  
---- parameters are:
+
---- parameters are:
---- page = (name of page to load; leave blank to call mw.title.getCurrentTitle()
+
---- page = (name of page to load; leave blank to call mw.title.getCurrentTitle()
----    this is "text" passed to mw.title.new or "title" passed to mw.title.makeTitle
+
----    this is "text" passed to mw.title.new or "title" passed to mw.title.makeTitle
---- makeTitle = nonblank to call mw.title.makeTitle otherwise mw.title.new is called
+
---- makeTitle = nonblank to call mw.title.makeTitle otherwise mw.title.new is called
---- namespace = (parameter passed to new/makeTitle)
+
---- namespace = (parameter passed to new/makeTitle)
---- fragment = (parameter passed to makeTitle)
+
---- fragment = (parameter passed to makeTitle)
---- interwiki = (parameter passed to makeTitle)
+
---- interwiki = (parameter passed to makeTitle)
---- p1 = first parameter passed to functions within the title object
+
---- p1 = first parameter passed to functions within the title object
---- p2 = second parameter " " " "
+
---- p2 = second parameter " " " "
---- p3 etc. (for inNamespaces)
+
---- p3 etc. (for inNamespaces)
  
 
+
function main(frame, field)
 
+
     local args, pargs = frame.args, ( frame:getParent() or {} ).args or {};
---- Sorry, getContents doesn't work for many applications because all templates are destroyed.  It does work on plain text though.
+
     local makeTitle=args.makeTitle or pargs.makeTitle or "";
 
+
     local namespace=args.namespace or pargs.namespace or "";
local p = {}
+
     local fragment=args.fragment or pargs.fragment or "";
 
+
     local interwiki=args.interwiki or pargs.interwiki or "";
function p.main(frame)
+
     local nowiki=args.nowiki or pargs.nowiki or false;
     local args=frame.args
+
     local page=args.page or args[1] or pargs.page or pargs[1];
    local parent=frame.getParent(frame)
+
     local id= tonumber( args.id or pargs.id );
    local pargs={}
+
     local pn = { "", "", "", "", "", "", "", "", "" };
    if parent then pargs=parent.args end
 
     local makeTitle=args.makeTitle or pargs.makeTitle or ""
 
     local namespace=args.namespace or pargs.namespace or ""
 
     local fragment=args.fragment or pargs.fragment or ""
 
     local interwiki=args.interwiki or pargs.interwiki or ""
 
     local p1 = args.p1 or pargs.p1 or ""
 
     local p2 = args.p2 or pargs.p2 or ""
 
     local p3 = args.p3 or pargs.p3 or ""
 
     local p4 = args.p4 or pargs.p4 or ""
 
    local p5 = args.p5 or pargs.p5 or ""
 
    local p6 = args.p6 or pargs.p6 or ""
 
    local p7 = args.p7 or pargs.p7 or ""
 
    local p8 = args.p8 or pargs.p8 or ""
 
    local p9 = args.p9 or pargs.p9 or ""
 
    local nowiki = args.nowiki or pargs.nowiki or false
 
    local page=args.page or pargs.page or args[1] or pargs[1]
 
    if page=="" then page=nil end
 
 
     local title -- holds the result of the mw.title.xxx call
 
     local title -- holds the result of the mw.title.xxx call
     if not(page) then
+
   
         title=mw.title.getCurrentTitle()
+
    for i = 1,9 do pn[i] = args['p'..i] or pargs['p'..i] or ""; end
         if not(title) then return "error: failed to getCurrentTitle()" end
+
     if not id and not mw.ustring.match( page, '%S' ) then page = nil; end
     else if makeTitle then
+
   
            title=mw.title.makeTitle(namespace,page,fragment,interwiki)
+
    if id then
            if not (title) then return "error: failed to makeTitle(" .. namespace .. "," .. page .. "," .. fragment .. "," .. interwiki .. ")" end
+
         title = mw.title.new(id);
         else if id then
+
         if not title then return "error: failed to mw.title.new(" .. id .. ")"; end
                title=mw.title.new(id)
+
     elseif not page then
                if not (title) then return "error: failed to mw.title.new(" .. id .. ")" end
+
        title = mw.title.getCurrentTitle();
            else
+
        if not title then return "error: failed to getCurrentTitle()"; end
                title=mw.title.new(page,namespace)
+
    elseif makeTitle then
                if not (title) then return "error: failed to mw.title.new(" .. page .. "," .. namespace .. ")" end
+
        title = mw.title.makeTitle(namespace, page, fragment, interwiki);
            end -- if id
+
         if not title then
        end -- if makeTitle
+
            return mw.ustring.format("error: failed to makeTitle(%s,%s,%s,%s)", namespace, page, fragment, interwiki);
     end -- if not(page)
+
        end
     local result=title[field]
+
    else
     if type(result)=="function" then
+
        title=mw.title.new(page, namespace);
         if nowiki then
+
        if not title then return "error: failed to mw.title.new(" .. page .. "," .. namespace .. ")"; end
             return "<pre><nowiki>" .. tostring(result(title,p1,p2,p3,p4,p5,p6,p7,p8,p9)).. [[</nowiki></pre>]] -- I *think* these are all page:x() calls
+
    end
         else return result(title,p1,p2,p3,p4,p5,p6,p7,p8,p9)
+
      
 +
     local result = title[field];
 +
     if type(result) == "function" then
 +
        result = result( title, unpack(pn) );
 +
         if nowiki and result ~= nil then
 +
             return mw.text.nowiki( tostring( result ) );
 +
        elseif result == nil or result == false then
 +
            return "";
 +
         else
 +
            return tostring(result);
 
         end
 
         end
     else return tostring(result) -- note that nil values will be returned as "nil", not ""
+
     else
 +
        return tostring(result or "");
 
     end
 
     end
 
end
 
end
  
 +
local p = {};
  
function p.id(frame)
+
-- main function does all the work
    field="id"
+
function p.id(frame) return main(frame, "id"); end
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
+
function p.interwiki(frame) return main(frame, "interwiki"); end
end
+
function p.namespace(frame) return main(frame, "namespace"); end
 
+
function p.fragment(frame) return main(frame, "fragment"); end
function p.interwiki(frame)
+
function p.nsText(frame) return main(frame, "nsText") end
    field="interwiki"
+
function p.subjectNsText(frame) return main(frame, "subjectNsText"); end
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
+
function p.text(frame) return main(frame, "text"); end
end
+
function p.prefixedText(frame) return main(frame, "prefixedText"); end
 
+
function p.fullText(frame) return main(frame, "fullText"); end
function p.namespace(frame)
+
function p.rootText(frame) return main(frame, "rootText"); end
    field="namespace"
+
function p.baseText(frame) return main(frame, "baseText"); end
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
+
function p.subpageText(frame) return main(frame, "subpageText"); end
end
+
function p.canTalk(frame) return main(frame, "canTalk"); end
 
+
function p.exists(frame) return main(frame, "exists"); end
function p.fragment(frame)
+
function p.fileExists(frame) return main(frame, "fileExists"); end
    field="fragment"
+
function p.isContentPage(frame) return main(frame, "isContentPage"); end
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
+
function p.isExternal(frame) return main(frame, "isExternal"); end
end
+
function p.isLocal(frame) return main(frame, "isLocal"); end
 
+
function p.isRedirect(frame) return main(frame, "isRedirect"); end
function p.nsText(frame)
+
function p.isSpecialPage(frame) return main(frame, "isSpecialPage"); end
    field="nsText"
+
function p.isSubpage(frame) return main(frame, "isSubpage"); end
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
+
function p.isTalkPage(frame) return main(frame, "isTalkPage"); end
end
+
function p.isSubpageOf(frame) return main(frame, "isSubpageOf"); end
 
+
function p.inNamespace(frame) return main(frame, "inNamespace"); end
function p.subjectNsText(frame)
+
function p.inNamespaces(frame) return main(frame, "inNamespaces"); end
    field="subjectNsText"
+
function p.hasSubjectNamespace(frame) return main(frame, "hasSubjectNamespace"); end
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
+
function p.contentModel(frame) return main(frame, "contentModel"); end
end
+
function p.basePageTitle(frame) return main(frame, "basePageTitle"); end
 
+
function p.rootPageTitle(frame) return main(frame, "rootPageTitle"); end
function p.text(frame)
+
function p.talkPageTitle(frame) return main(frame, "talkPageTitle"); end
    field="text"
+
function p.subjectPageTitle(frame) return main(frame, "subjectPageTitle"); end
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
+
function p.subPageTitle(frame) return main(frame, "subPageTitle"); end
end
+
function p.partialUrl(frame) return main(frame, "partialUrl"); end
 
+
function p.fullUrl(frame) return main(frame, "fullUrl"); end
function p.prefixedText(frame)
+
function p.localUrl(frame) return main(frame, "localUrl"); end
    field="prefixedText"
+
function p.canonicalUrl(frame) return main(frame, "canonicalUrl"); end
    return p.main(frame)
+
function p.getContent(frame) return main(frame, "getContent"); end
end
 
 
 
function p.fullText(frame)
 
    field="fullText"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.rootText(frame)
 
    field="rootText"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.baseText(frame)
 
    field="baseText"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.subpageText(frame)
 
    field="subpageText"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.canTalk(frame)
 
    field="canTalk"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.exists(frame)
 
    field="exists"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.fileExists(frame)
 
    field="fileExists"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.isContentPage(frame)
 
    field="isContentPage"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.isExternal(frame)
 
    field="isExternal"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.isLocal(frame)
 
    field="isLocal"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.isRedirect(frame)
 
    field="isRedirect"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.isSpecialPage(frame)
 
    field="isSpecialPage"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.isSubpage(frame)
 
    field="isSubpage"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.isTalkPage(frame)
 
    field="isTalkPage"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.isSubpageOf(frame)
 
    field="isSubpageOf"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.inNamespace(frame)
 
    field="inNamespace"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.inNamespaces(frame)
 
    field="inNamespaces"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.hasSubjectNamespace(frame)
 
    field="hasSubjectNamespace"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.contentModel(frame)
 
    field="contentModel"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.basePageTitle(frame)
 
    field="basePageTitle"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.rootPageTitle(frame)
 
    field="rootPageTitle"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.talkPageTitle(frame)
 
    field="talkPageTitle"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.subjectPageTitle(frame)
 
    field="subjectPageTitle"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.subPageTitle(frame)
 
    field="subPageTitle"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.partialUrl(frame)
 
    field="partialUrl"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.fullUrl(frame)
 
    field="fullUrl"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.localUrl(frame)
 
    field="localUrl"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.canonicalUrl(frame)
 
    field="canonicalUrl"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
 
 
function p.getContent(frame)
 
    field="getContent"
 
    return p.main(frame) -- I ''think'' that frame, field automatically is available to p.main
 
end
 
  
 
return p
 
return p

Revision as of 13:05, 22 April 2013

This module is meant to allow the goodies listed in Script error: No such module "Section link". to be accessed by people who do not want to write a Lua module.

Usage is: {{#invoke:Page|function|parameters}}

Functions

In the usage above, function is one of the following fields or functions for title objects:

  • id: The page_id. 0 if the page does not exist.
  • interwiki: The interwiki prefix, or the empty string if none.
  • namespace: The namespace number.
  • fragment: The fragment, or the empty string. May be assigned.
  • nsText: The text of the namespace for the page.
  • subjectNsText: The text of the subject namespace for the page.
  • text: The title of the page, without the namespace or interwiki prefixes.
  • prefixedText: The title of the page, with the namespace and interwiki prefixes.
  • fullText: The title of the page, with the namespace and interwiki prefixes and the fragment.
  • rootText: If this is a subpage, the title of the root page without prefixes. Otherwise, the same as title.text.
  • baseText: If this is a subpage, the title of the page it is a subpage of without prefixes. Otherwise, the same as title.text.
  • subpageText: If this is a subpage, just the subpage name. Otherwise, the same as title.text.
  • canTalk: Whether the page for this title could have a talk page.
  • exists: Whether the page exists. Alias for fileExists for Media-namespace titles.
  • fileExists: Whether the file exists. For File- and Media-namespace titles, this is expensive.
  • isContentPage: Whether this title is in a content namespace.
  • isExternal: Whether this title has an interwiki prefix.
  • isLocal: Whether this title is in this project. For example, on the English Wikipedia, any other Wikipedia is considered "local" while Wiktionary and such are not.
  • isRedirect: Whether this is the title for a page that is a redirect.
  • isSpecialPage: Whether this is the title for a possible special page (i.e. a page in the Special: namespace).
  • isSubpage: Whether this title is a subpage of some other title.
  • isTalkPage: Whether this is a title for a talk page.
  • isSubpageOf( title2 ): Whether this title is a subpage of the given title.
  • inNamespace( ns ): Whether this title is in the given namespace. Namespaces may be specified by anything that is a key found in mw.site.namespaces.
  • inNamespaces( ... ): Whether this title is in any of the given namespaces. Namespaces may be specified by anything that is a key found in mw.site.namespaces.
  • hasSubjectNamespace( ns ): Whether this title's subject namespace is in the given namespace. Namespaces may be specified by anything that is a key found in mw.site.namespaces.
  • contentModel: The content model for this title, as a string.
  • basePageTitle: The same as mw.title.makeTitle( title.namespace, title.baseText ).
  • rootPageTitle: The same as mw.title.makeTitle( title.namespace, title.rootText ).
  • talkPageTitle: The same as mw.title.makeTitle( mw.site.namespaces[title.namespace].talk.id, title.text ), or nil if this title cannot have a talk page.
  • subjectPageTitle: The same as mw.title.makeTitle( mw.site.namespaces[title.namespace].subject.id, title.text ).
  • subPageTitle( text ): The same as mw.title.makeTitle( title.namespace, title.text .. '/' .. text ).
  • partialUrl(): Returns title.text encoded as it would be in a URL.
  • fullUrl( query, proto ): Returns the full URL (with optional query table/string) for this title. proto may be specified to control the scheme of the resulting url: "http", "https", "relative" (the default), or "canonical".
  • localUrl( query ): Returns the local URL (with optional query table/string) for this title.
  • canonicalUrl( query ): Returns the canonical URL (with optional query table/string) for this title.
  • getContent(): Returns the (unparsed) content of the page, or nil if there is no page.

Parameters

Page selection

  • id = Page ID of the page to load and evaluate. If this parameter is specified, then other page selection parameters are ignored.
  • page = name of the page to load and evaluate. This is parameter "text" passed to mw.title.new or "title" passed to mw.title.makeTitle in the Mediawiki documentation.
    • Leave page blank to call mw.title.getCurrentTitle() and thus default to the page presently being viewed.
  • makeTitle = Set this to any nonblank value to call mw.title.makeTitle. Otherwise mw.title.new is called. The functions available for these and for getCurrentTitle() are generally (exactly?) the same.
  • namespace = This parameter is passed to new/makeTitle to define what page to open.
  • fragment = This parameter is passed to makeTitle per the MediaWiki documentation.
  • interwiki = This parameter is passed to makeTitle per the MediaWiki documentation.

Title object function parameters

  • p1 is the first parameter passed to the functions within the title object.
    • "title2" for isSubPageOf
    • "ns" for inNamespace
    • (first parameter) of inNameSpaces
    • "ns" for hasSubjectNamespace
    • "text" for subpageTitle
    • "query" for fullUrl, localUrl, canonicalUrl
  • p2 is the second parameter passed to the functions within the title object.
    • (second parameter) of inNameSpaces
    • "proto" for fullUrl
  • p3 to p9 are collected and passed to the functions, but should only affect inNamespaces.

Postprocessing

  • as = Changes how contents of a page is returned when function getContent() is called.
    • "pre" (default) to wrap the page's content inside <pre></pre>.
    • "nowiki" to wrap the page's content inside <nowiki></nowiki>
    • "expand" to expand the page's content
    • "raw" (or any other unrecognized value) to return the page content without any wrapping

---- This module is meant to allow the goodies listed in
---- http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Title_objects
---- to be accessed by people who don't want to program a Lua module.
---- Usage is:  {{#invoke:Page|(function)|parameters}}
---- (function) is one of the function names from the table above:
---- id, interwiki, namespace, fragment, nsText, subjectNsText, text, prefixedText, fullText ...

---- parameters are:
---- page = (name of page to load; leave blank to call mw.title.getCurrentTitle()
----    this is "text" passed to mw.title.new or "title" passed to mw.title.makeTitle
---- makeTitle = nonblank to call mw.title.makeTitle otherwise mw.title.new is called
---- namespace = (parameter passed to new/makeTitle)
---- fragment = (parameter passed to makeTitle)
---- interwiki = (parameter passed to makeTitle)
---- p1 = first parameter passed to functions within the title object
---- p2 = second parameter " " " "
---- p3 etc. (for inNamespaces)

function main(frame, field)
    local args, pargs = frame.args, ( frame:getParent() or {} ).args or {};
    local makeTitle=args.makeTitle or pargs.makeTitle or "";
    local namespace=args.namespace or pargs.namespace or "";
    local fragment=args.fragment or pargs.fragment or "";
    local interwiki=args.interwiki or pargs.interwiki or "";
    local nowiki=args.nowiki or pargs.nowiki or false;
    local page=args.page or args[1] or pargs.page or pargs[1];
    local id= tonumber( args.id or pargs.id );
    local pn = { "", "", "", "", "", "", "", "", "" };
    local title -- holds the result of the mw.title.xxx call
    
    for i = 1,9 do pn[i] = args['p'..i] or pargs['p'..i] or ""; end
    if not id and not mw.ustring.match( page, '%S' ) then page = nil; end
    
    if id then
        title = mw.title.new(id);
        if not title then return "error: failed to mw.title.new(" .. id .. ")"; end
    elseif not page then
        title = mw.title.getCurrentTitle();
        if not title then return "error: failed to getCurrentTitle()"; end
    elseif makeTitle then
        title = mw.title.makeTitle(namespace, page, fragment, interwiki);
        if not title then
            return mw.ustring.format("error: failed to makeTitle(%s,%s,%s,%s)", namespace, page, fragment, interwiki);
        end
    else
        title=mw.title.new(page, namespace);
        if not title then return "error: failed to mw.title.new(" .. page .. "," .. namespace .. ")"; end
    end
    
    local result = title[field];
    if type(result) == "function" then
        result = result( title, unpack(pn) );
        if nowiki and result ~= nil then
            return mw.text.nowiki( tostring( result ) );
        elseif result == nil or result == false then
            return "";
        else
            return tostring(result);
        end
    else
        return tostring(result or "");
    end
end

local p = {};

-- main function does all the work
function p.id(frame) return main(frame, "id"); end
function p.interwiki(frame) return main(frame, "interwiki"); end
function p.namespace(frame) return main(frame, "namespace"); end
function p.fragment(frame) return main(frame, "fragment"); end
function p.nsText(frame) return main(frame, "nsText") end
function p.subjectNsText(frame) return main(frame, "subjectNsText"); end
function p.text(frame) return main(frame, "text"); end
function p.prefixedText(frame) return main(frame, "prefixedText"); end
function p.fullText(frame) return main(frame, "fullText"); end
function p.rootText(frame) return main(frame, "rootText"); end
function p.baseText(frame) return main(frame, "baseText"); end
function p.subpageText(frame) return main(frame, "subpageText"); end
function p.canTalk(frame) return main(frame, "canTalk"); end
function p.exists(frame) return main(frame, "exists"); end
function p.fileExists(frame) return main(frame, "fileExists"); end
function p.isContentPage(frame) return main(frame, "isContentPage"); end
function p.isExternal(frame) return main(frame, "isExternal"); end
function p.isLocal(frame) return main(frame, "isLocal"); end
function p.isRedirect(frame) return main(frame, "isRedirect"); end
function p.isSpecialPage(frame) return main(frame, "isSpecialPage"); end
function p.isSubpage(frame) return main(frame, "isSubpage"); end
function p.isTalkPage(frame) return main(frame, "isTalkPage"); end
function p.isSubpageOf(frame) return main(frame, "isSubpageOf"); end
function p.inNamespace(frame) return main(frame, "inNamespace"); end
function p.inNamespaces(frame) return main(frame, "inNamespaces"); end
function p.hasSubjectNamespace(frame) return main(frame, "hasSubjectNamespace"); end
function p.contentModel(frame) return main(frame, "contentModel"); end
function p.basePageTitle(frame) return main(frame, "basePageTitle"); end
function p.rootPageTitle(frame) return main(frame, "rootPageTitle"); end
function p.talkPageTitle(frame) return main(frame, "talkPageTitle"); end
function p.subjectPageTitle(frame) return main(frame, "subjectPageTitle"); end
function p.subPageTitle(frame) return main(frame, "subPageTitle"); end
function p.partialUrl(frame) return main(frame, "partialUrl"); end
function p.fullUrl(frame) return main(frame, "fullUrl"); end
function p.localUrl(frame) return main(frame, "localUrl"); end
function p.canonicalUrl(frame) return main(frame, "canonicalUrl"); end
function p.getContent(frame) return main(frame, "getContent"); end

return p