Teamplaid:Pf/documentation
This is a documentation subpage for Teamplaid:Pf. It contains usage information, categories and other content that is not part of the original teamplaid page. |
{{Pf}} is used to conveniently link to a ParserFunction, along the lines of {{Tl}}. Pf stands for ParserFunction.
Usage
deasaich{{Pf|parser function}}, this creates a direct link to the relevant function, omit # and colon, e.g. use {{Pf|ifexpr}} to get {{Pf|ifexpr}}.
{{Pf|parser function|1st parameter|2nd parameter|3rd parameter|4th parameter}}, this creates a link with parameters include, e.g. use {{Pf|ifexpr|1+1>1|true|false}} to get {{Pf|ifexpr|1+1>1|true|false}}.
For parameters with equals signs, number each parameter, i.e., use {{Pf|1=parser function|2=1st parameter|3=2nd parameter|4=3rd parameter|5=4th parameter}}, e.g. use {{Pf|1=ifexpr|2=1+1=1|3=1+1=1|4=1+1!=1}} to get {{Pf|1=ifexpr|2=1+1=1|3=1+1=1|4=1+1!=1}}.
Input | Output |
---|---|
{{Pf|expr}} | {{#expr}} |
{{Pf|if}} | {{#if}} |
{{Pf|ifeq}} | {{#ifeq}} |
{{Pf|iferror}} | {{#iferror}} |
{{Pf|ifexpr}} | {{#ifexpr}} |
{{Pf|ifexist}} | {{#ifexist}} |
{{Pf|rel2abs}} | {{#rel2abs}} |
{{Pf|switch}} | {{#switch}} |
{{Pf|time}} | {{#time}} |
{{Pf|titleparts}} | {{#titleparts}} |
{{Pf|lc}} | {{lc}} |
{{Pf|uc}} | {{uc}} |
{{Pf|lcfirst}} | {{lcfirst}} |
{{Pf|ucfirst}} | {{ucfirst}} |
{{Pf|urlencode}} | {{urlencode}} |
{{Pf|anchorencode}} | {{anchorencode}} |
{{Pf|ns}} | {{ns}} |
{{Pf|localurl}} | {{localurl}} |
{{Pf|localurle}} | {{localurle}} |
{{Pf|fullurl}} | {{fullurl}} |
{{Pf|fullurle}} | {{fullurle}} |
{{Pf|language}} | {{#language}} |
{{Pf|pagesincategory}} | {{pagesincategory}} |
{{Pf|pagesincat}} | {{pagesincat}} |
{{Pf|section}} | {{#section}} |
{{Pf|section-x}} | {{#section-x}} |
{{Pf|section-h}} | {{#section-h}} |
{{Pf|lst}} | {{#lst}} |
{{Pf|lstx}} | {{#lstx}} |
{{Pf|lsth}} | {{#lsth}} |
Faic cuideachd - Also see
- Teamplaid:Pf/documentation(deasaich deasbaireachd ceanglaichean-lìn eachdraidh)
- Teamplaid:Tl(deasaich deasbaireachd ceanglaichean-lìn eachdraidh)
- m:ParserFunctions
Other formatting templates
deasaichGeneral-purpose formatting
deasaichLink style → | Linked | Unlinked | Linked with subst | Linked including braces | Linked with alternative text | |
---|---|---|---|---|---|---|
Text style ↓ | ↓ {{Tlg}} options1 →
|
DEFAULT | nolink=yes | subst=yes | braceinside=yes | alttext=Foo 2=Foo |
normal | DEFAULT | {{Tlg}} 1{{Tl}} {{Tlp}} 2{{Tlu}} 3
|
{{Tlf}} 2
|
{{Tls}} {{Tlsp}} {{Tlsu}} 3
|
{{Tn}}
|
{{Tla}}
|
code
|
code=yes | {{Tl2}} {{Tlx}} {{Tlxu}} 3
|
{{Tlc}} 2{{Tld}} 2{{Tnull}}
|
{{Tlxs}}
|
N/A | |
monospace kbd |
plaincode=yes4 kbd=yes5 |
{{Tltt}} 5{{Tltt2}} 5
|
N/A | {{Tltss}} 6
| ||
bold | bold=yes | {{Tlb}}
|
N/A | |||
bold+code
|
code=yes | {{Tlxb}}
| ||||
italic+code
|
code=yes | {{Tlxi}}
| ||||
|
Other formatting templates
deasaichCode example | Effect | Notes |
---|---|---|
{{Tl2|Hatnote|lang=fr}} | {{Hatnote}} | Supports linking to sister projects (e.g., fr:Hatnote) |
{{Tlu|User:Ahunt/SSHFS}} | {{User:Ahunt/SSHFS}} | Supports linking to any namespace |
{{Demo|<nowiki>{{Hatnote|lang=fr|Some text}}</nowiki>}} | {{Hatnote|lang=fr|Some text}} |
Shows code and example |
{{Xpd|Hatnote|Some Hatnote text}} | "{{Hatnote|Some Hatnote text}}" gives " " [1] |
Shows code, example and a link to expand the template code |
{{Tln|Hatnote}} | Template:Hatnote | Produces a normal link to the template |
{{Elc|Template:Hatnote}} {{Elc|Template:Hatnote|Hatnote}} |
[[Template:Hatnote]] [[Template:Hatnote|Hatnote]] |
Formats wikilink, with optional piped link text and blended suffix |
{{Ml|Example|hello}} | {{#invoke:Example|hello}} | Counterpart to {{Tl}} for linking to Lua modules |
{{Mlx|Example|hello}} | {{#invoke:Example|hello}} |
Counterpart to {{Tlx}} for linking to Lua modules |
{{Para|title|<var>book title</var>}} | title=book title | Formats template parameters for display, with or without values |
{{Sclx|LASTING}} | [[w:en:WP:LASTING]] |
Takes a shortcut suffix in project namespace and displays it with brackets and the WP: alias in a <code>...</code> Tag.
|
{{Tag|ref}} {{Xtag|templatedata}} |
<ref>...</ref> <templatedata> |
Formats [X]HTML tags; can add content, choose opening, closing, or self-closing |
{{Dtl|Ping project}} | {{d:Ping project}} | Wikidata counterpart to {{Tl}} |
{{Pf|If}} {{Pf|If|{{{1}}}|true|false}} |
{{#If}} {{#If:{{{1}}}|true|false}} |
Parser function equivalent to {{Tl}} |
With utility links
deasaichCode example | Effect |
---|---|
{{Lt|Hatnote}} | Teamplaid:Hatnote (deasaich | deasbaireachd | eachdraidh | ceanglaichean | faire | logaichean) |
{{Lts|Hatnote}} | Teamplaid:Hatnote(deasaich deasbaireachd ceanglaichean-lìn eachdraidh) |
{{T links|Hatnote}} | Hatnote (edit talk history links # /subpages /doc /doc edit /sbox /sbox diff /test) |
{{Tfd links|Hatnote}} | Template:Hatnote (edit · talk · history · links · transclusions · logs · subpages · delete) |
{{Tltt|Hatnote}} | {{Hatnote}} |
{{Tetl|Hatnote}} | {{Hatnote}} |
{{Tsetl|Hatnote}} | {{subst:Hatnote}} |
{{Ti|Hatnote}} | Teamplaid:Hatnote (deasbaireachd⧼dot-separator⧽ceanglaichean-lìn⧼dot-separator⧽deasaich) |
{{Tic|Hatnote}} | Template:Hatnote (talk links edit) |
{{Tim|Hatnote}} | m:Template:Hatnote (backlinks edit) |
{{Tiw|Hatnote}} | Teamplaid:Hatnote (ceanglaichean deasaich) |
{{Tlt|Hatnote}} | {{Hatnote}} (talk) |
{{Ttl|Hatnote}} | {{Hatnote}} (t/l) |
{{Twlh|Hatnote}} | Template:Hatnote (links, talk) |