Jump to content

Module:Sandbox/Frame/doc

From Wikipedia

This is the documentation page for Module:Sandbox/Frame

Tests[edit]

Code {{#invoke:Sandbox/Frame|#key=<!-- xyzzy -->#|a|b|c|2=B|4=D|d|49=!|{{=}}={{=}}|{{!}}={{!}}|=|<nowiki/>=<nowiki/>|WhatLinksHere={{Special:WhatLinksHere/Module:Sandbox/Frame}}}}
Result
package args (0) = 
frame:getTitle() = "Module:Sandbox/Frame"
frame = table#1 {
    ["args"] = table#2 {
        metatable = table#3
        "a",
        "B",
        "c",
        "d",
        [49] = "!",
        [""] = "",
        ["="] = "=",
        ["WhatLinksHere"] = "'\"`UNIQ--item-3--QINU`\"'",
        ["|"] = "|",
        ["'\"`UNIQ--nowiki-00000001-QINU`\"'"] = "'\"`UNIQ--nowiki-00000002-QINU`\"'",
    },
    ["argumentPairs"] = function#1,
    ["callParserFunction"] = function#2,
    ["expandTemplate"] = function#3,
    ["extensionTag"] = function#4,
    ["getArgument"] = function#5,
    ["getParent"] = function#6,
    ["getTitle"] = function#7,
    ["newChild"] = function#8,
    ["newParserValue"] = function#9,
    ["newTemplateParserValue"] = function#10,
    ["preprocess"] = function#11,
}
frame:getParent():getTitle() = "Module:Sandbox/Frame/doc"
frame:getParent() = table#1 {
    ["args"] = table#2 {
        metatable = table#3
    },
    ["argumentPairs"] = function#1,
    ["callParserFunction"] = function#2,
    ["expandTemplate"] = function#3,
    ["extensionTag"] = function#4,
    ["getArgument"] = function#5,
    ["getParent"] = function#6,
    ["getTitle"] = function#7,
    ["newChild"] = function#8,
    ["newParserValue"] = function#9,
    ["newTemplateParserValue"] = function#10,
    ["preprocess"] = function#11,
}
pkg == require(frame:getTitle()) = false
invoke key = "#key=#"
invoke ParserFunction test
package args (0) = 
frame:getTitle() = "Module:Sandbox/Frame"
frame = table#1 {
    ["args"] = table#2 {
        metatable = table#3
        "abc",
        ["def"] = "1",
    },
    ["argumentPairs"] = function#1,
    ["callParserFunction"] = function#2,
    ["expandTemplate"] = function#3,
    ["extensionTag"] = function#4,
    ["getArgument"] = function#5,
    ["getParent"] = function#6,
    ["getTitle"] = function#7,
    ["newChild"] = function#8,
    ["newParserValue"] = function#9,
    ["newTemplateParserValue"] = function#10,
    ["preprocess"] = function#11,
}
frame:getParent():getTitle() = "Module:Sandbox/Frame"
frame:getParent() = table#1 {
    ["args"] = table#2 {
        metatable = table#3
        "a",
        "B",
        "c",
        "d",
        [49] = "!",
        [""] = "",
        ["="] = "=",
        ["WhatLinksHere"] = "'\"`UNIQ--item-3--QINU`\"'",
        ["|"] = "|",
        ["'\"`UNIQ--nowiki-00000001-QINU`\"'"] = "'\"`UNIQ--nowiki-00000002-QINU`\"'",
    },
    ["argumentPairs"] = function#1,
    ["callParserFunction"] = function#2,
    ["expandTemplate"] = function#3,
    ["extensionTag"] = function#4,
    ["getArgument"] = function#5,
    ["getParent"] = function#6,
    ["getTitle"] = function#7,
    ["newChild"] = function#8,
    ["newParserValue"] = function#9,
    ["newTemplateParserValue"] = function#10,
    ["preprocess"] = function#11,
}
pkg == require(frame:getTitle()) = false
invoke key = "{{<#rtest#>}}"

invoke ParserFunction parent test

package args (0) = 
frame:getTitle() = "Module:Sandbox/Frame"
frame = table#1 {
    ["args"] = table#2 {
        metatable = table#3
        "abc",
        ["def"] = "1",
    },
    ["argumentPairs"] = function#1,
    ["callParserFunction"] = function#2,
    ["expandTemplate"] = function#3,
    ["extensionTag"] = function#4,
    ["getArgument"] = function#5,
    ["getParent"] = function#6,
    ["getTitle"] = function#7,
    ["newChild"] = function#8,
    ["newParserValue"] = function#9,
    ["newTemplateParserValue"] = function#10,
    ["preprocess"] = function#11,
}
frame:getParent():getTitle() = "Module:Sandbox/Frame/doc"
frame:getParent() = table#1 {
    ["args"] = table#2 {
        metatable = table#3
    },
    ["argumentPairs"] = function#1,
    ["callParserFunction"] = function#2,
    ["expandTemplate"] = function#3,
    ["extensionTag"] = function#4,
    ["getArgument"] = function#5,
    ["getParent"] = function#6,
    ["getTitle"] = function#7,
    ["newChild"] = function#8,
    ["newParserValue"] = function#9,
    ["newTemplateParserValue"] = function#10,
    ["preprocess"] = function#11,
}
pkg == require(frame:getTitle()) = false
invoke key = "{{<#rtest#>}}"

invoke ParserFunction child test

package args (0) = 
frame:getTitle() = "Module:Sandbox/Frame"
frame = table#1 {
    ["args"] = table#2 {
        metatable = table#3
        "abc",
        ["def"] = "1",
    },
    ["argumentPairs"] = function#1,
    ["callParserFunction"] = function#2,
    ["expandTemplate"] = function#3,
    ["extensionTag"] = function#4,
    ["getArgument"] = function#5,
    ["getParent"] = function#6,
    ["getTitle"] = function#7,
    ["newChild"] = function#8,
    ["newParserValue"] = function#9,
    ["newTemplateParserValue"] = function#10,
    ["preprocess"] = function#11,
}
frame:getParent():getTitle() = "Module:Sandbox/Frame/doc"
frame:getParent() = table#1 {
    ["args"] = table#2 {
        metatable = table#3
        "def",
        ["abc"] = "1",
    },
    ["argumentPairs"] = function#1,
    ["callParserFunction"] = function#2,
    ["expandTemplate"] = function#3,
    ["extensionTag"] = function#4,
    ["getArgument"] = function#5,
    ["getParent"] = function#6,
    ["getTitle"] = function#7,
    ["newChild"] = function#8,
    ["newParserValue"] = function#9,
    ["newTemplateParserValue"] = function#10,
    ["preprocess"] = function#11,
}
pkg == require(frame:getTitle()) = false
invoke key = "{{<#rtest#>}}"

invoke ParserFunction parent child test

package args (0) = 
frame:getTitle() = "Module:Sandbox/Frame"
frame = table#1 {
    ["args"] = table#2 {
        metatable = table#3
        "abc",
        ["def"] = "1",
    },
    ["argumentPairs"] = function#1,
    ["callParserFunction"] = function#2,
    ["expandTemplate"] = function#3,
    ["extensionTag"] = function#4,
    ["getArgument"] = function#5,
    ["getParent"] = function#6,
    ["getTitle"] = function#7,
    ["newChild"] = function#8,
    ["newParserValue"] = function#9,
    ["newTemplateParserValue"] = function#10,
    ["preprocess"] = function#11,
}
frame:getParent():getTitle() = "Module:Sandbox/Frame/doc"
frame:getParent() = table#1 {
    ["args"] = table#2 {
        metatable = table#3
        "xyz",
        ["zyx"] = "1",
    },
    ["argumentPairs"] = function#1,
    ["callParserFunction"] = function#2,
    ["expandTemplate"] = function#3,
    ["extensionTag"] = function#4,
    ["getArgument"] = function#5,
    ["getParent"] = function#6,
    ["getTitle"] = function#7,
    ["newChild"] = function#8,
    ["newParserValue"] = function#9,
    ["newTemplateParserValue"] = function#10,
    ["preprocess"] = function#11,
}
pkg == require(frame:getTitle()) = false
invoke key = "{{<#rtest#>}}"

Notes[edit]

wikitext parameters[edit]

  • parameters can be numbered or named
  • numbered parameters can be implicitly or explicitly numbered
  • named parameters are case-sensitive, can contain spaces and underscores and can be empty; can contain almost anything including punctuation and strip markers so long a some things are properly escaped such as: {{=}}, {{!}}
  • parameters cannot begin or end with a space (although arguments to implicitly numbered parameters can contain leading and trailing spaces)
  • explicitly numbered parameters must be normalized (i.e., no leading zero padding, etc.) positive integers or they will be considered named parameters

page titles[edit]

  • mw:Manual:$wgLegalTitleChars
    • the first character often is case-insensitively forced to uppercase (based on $wgCapitalLinks)
    • reserved characters include: #<>[]|{} (wikitext markup), ASCII control characters 0–31 and 127, Unicode U+FFFD, HTML character entities
    • cannot contain three or more continuous ~ tildes as these have wikitext markup meaning
    • cannot begin with a namespace name including the empty article namespace consisting of a single : colon
    • cannot begin with an interwiki or interlanguage prefix
    • namespace, interwiki and interlanguage prefixes are case-insensitive
    • cannot be . or ..; or begin with ./ or ../; or contain /./ or /../; or end with /. or /..
    • / is a reserved character when subpages are enabled for a namespace
    • _ characters are treated as spaces
    • cannot begin or end with a space
    • cannot contain consecutive spaces
    • cannot contain % percent-encoded hexadecimal digits
  • mw:Manual:PAGENAMEE encoding
    • Compare differences with: {{PAGENAME}}, {{PAGENAMEE}}, {{urlencode:}} and {{anchorencode:}}
  • mw:Manual:Page table#Schema summary
    • page_namespace is stored as int(11)
    • page_title is stored as varbinary(255)

Subpages[edit]