Difference between revisions of "Template:Pf"

From blackwiki
Jump to navigation Jump to search
blackwiki>Omniplex
(rm extraneous .2B breaking the fragment)
(greatly expand template capabilities; documentation and further features/tweaks to follow when I have time)
Line 1: Line 1:
{{[[m:ParserFunctions#.23{{urlencode:{{{1}}}}}:|#{{{1}}}]]}}<noinclude>
+
{{((}}{{
 +
  #switch: {{lc: {{{1|if}}} }}
 +
  | expr    | if      | ifeq    | iferror | ifexpr
 +
  | ifexist | rel2abs | switch  | time
 +
  | titleparts = [[mw:Help:Extension:ParserFunctions#.23{{lc:{{{1|if}}}}}:|#{{{1|if}}}]]
 +
  | lc      | uc      | lcfirst | ucfirst | urlencode | anchorencode
 +
  | ns = [[meta:Help:Parser function#{{uc:{{{1}}}}}|{{{1}}}]]
 +
  | localurl  | localurle  | fullurl
 +
  | fullurle = [[meta:Help:Parser function#URLs etc.|{{{1}}}]]
 +
  | language = [[meta:Help:Parser function#.23{{lc:{{{1}}}}}:|#{{{1}}}]]
 +
  | pagesincategory
 +
  | pagesincat = [[meta:Help:Parser function#Pages in category|{{{1}}}]]
 +
  | #default  = {{{1}}}<!-- This will link to a help section in the documentation about unrecognised parser functions. In the meantime, it's just a hidden comment. -->
 +
}}{{
 +
  #if: {{{2|}}}
 +
  | {{colon}}{{{2|}}}
 +
}}{{
 +
  #if: {{{3|}}}
 +
  | {{
 +
    #ifeq: {{{2|}}} |
 +
    | {{colon}}{{!}}
 +
  }}{{!}}{{{3}}}
 +
}}{{
 +
  #if: {{{4|}}}
 +
  | {{
 +
    #ifeq: {{{2|}}} |
 +
    | {{colon}}{{!}}
 +
  }}{{
 +
    #ifeq: {{{3|}}} |
 +
    | {{!}}
 +
  }}{{!}}{{{4}}}
 +
}}{{
 +
  #if: {{{5|}}}
 +
  | {{
 +
    #ifeq: {{{2|}}} |
 +
    | {{colon}}{{!}}
 +
  }}{{
 +
    #ifeq: {{{3|}}} |
 +
    | {{!}}
 +
  }}{{
 +
    #ifeq: {{{4|}}} |
 +
    | {{!}}
 +
  }}{{!}}{{{5}}}
 +
}}{{))}}<noinclude>
 
----
 
----
 
Usage: {{Tlx|{{PAGENAME}}|parser function}}, this creates a direct link to the relevant function, omit '''#''' and colon, e.g. use '''ifexpr''' to get {{{{PAGENAME}}|ifexpr}}.
 
Usage: {{Tlx|{{PAGENAME}}|parser function}}, this creates a direct link to the relevant function, omit '''#''' and colon, e.g. use '''ifexpr''' to get {{{{PAGENAME}}|ifexpr}}.
  
 
[[Category:Internal link templates|{{PAGENAME}}]]</noinclude>
 
[[Category:Internal link templates|{{PAGENAME}}]]</noinclude>

Revision as of 08:17, 28 February 2009

{{#if}}


Usage: {{Pf|parser function}}, this creates a direct link to the relevant function, omit # and colon, e.g. use ifexpr to get {{#ifexpr}}.