Template:Tlx/doc
From Lane Co Oregon
{{#ifeq: tlx/doc | doc |
{{#if:||}} }} Template:-
Similar templates at English sister projects [edit] | ||||
---|---|---|---|---|
File:Wikimedia-logo.svg | mta | Meta-wiki | Tlx/doc | |
File:Wikipedia-logo.png | wpd | Wikipedia | Tlx/doc | |
File:Commons-logo.svg | cms | Commons | {{#ifeq: Lane Co Oregon|Wikimedia Commons |Tlx/doc | |Tlx/doc | }}
File:Wikibooks-logo.svg | wbk | Wikibooks | {{#ifeq: Lane Co Oregon|Wikibooks |Tlx/doc | |Tlx/doc | }}
File:Wikiquote-logo.svg | wqt | Wikiquote | {{#ifeq:Lane Co Oregon|Wikiquote|[[Template:|]] | |[[q:Template:|]] | }}
File:Wikisource-logo.svg | wsr | Wikisource | {{#ifeq:Lane Co Oregon|Wikisource|[[Template:|]] | |[[s:Template:|]] | }}
File:Wiktionary-logo-en.png | wdy | Wiktionary | [[wikt:Template:|]] | |
File:Wikinews-logo.svg | wnw | Wikinews | [[n:Template:|]] | |
File:Wikispecies-logo.svg | wsp | Wikispecies | {{#ifeq:Lane Co Oregon|Wikispecies|Tlx/doc | |Tlx/doc | }}
File:Wikiversity-logo.svg | wvy | Wikiversity | Tlx/doc | |Tlx/doc | }}
File:Mediawiki.png | mdw | Mediawiki | Tlx/doc |
{{{{#ifeq:tlx|tlx|tlx|tlx}}{{#if:template| |template }}{{#if:first parameter| |first parameter }}{{#if:second| |second }}{{#if:third| |third }}{{#if:fourth| |... }}}} � {{{{#ifeq:template|template|template|template}}{{#if:first parameter| |first parameter }}{{#if:second| |second }}{{#if:third| |third }}{{#if:fourth| |fourth }}{{#if:fifth| |... }}}}
Purpose and naming: Mnemonically 'Template list expanded'... after {{{{#ifeq:tl|tl|tl|tl}}{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} Template list'
- This template takes another template-name and some associated pipe-tricked (numbered) parameters (or 'pass parameters'), and displays them as an 'example demonstration' of how the template-name template could be coded, literally. It's primary use is in instruction and documentation.
- Specifics: Up to five pass parameters (numbered or nowiki-keywords) for the specified template are displayed as 'placeholders', and over 5 parameters can be displayed using a coded vertical-bar (as in "|..."). A keyword parameter can be used, when tagged as a nowiki-keyword: "<nowiki>siz=10<\ owiki>" with each keyword parameter surrounded by "<nowiki>" tags; see Examples at bottom. For more details, see the this talk page.
- Exceptions: If the intended template lists numerous/keyword parameters, then perhaps this template should really not be used, and just hardcode the usage in double-braces, putting only nowiki-braces "{{" to start, such as: "<nowiki>{{<\
owiki>Anytemplate |arg1=23 |siz=250px}}".
- If given no additional parameters except
'template name' ({{{1}}}),
it presents the same as the similar {{Tl}} macro template -- a blue link nested in curly-braces-- the same as a user would apply the template without parameters, but with a noticably clearer font and spacing on most modern browsers.
- {{{{#ifeq:tl|tl|tl|Tl}}{{#if:Tl|
|Tl }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} display compared to {{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:Tl| |Tl }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}}: (Tl: {{Tlx}} versus Tlx: {{{{#ifeq:tl|tl|tl|Tl}}{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}})
- Comparatively, {{{{#ifeq:tl|tl|tl|Tl}}{{#if:|
|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} will not take or display additional parameters, and for minor technical reasons, may preferred for mere listing and referencing in long pages involving a lot of template expansions1.
- Additionally, Tlx will take a 'named' parameter 'SISTER' to link interwiki to other sister projects such as one of these examples: '|SISTER=W:', 'Tlx|SISTER=M:', 'Tlx|SISTER=Q:', 'Tlx|SISTER=S:', allowing documentation or discourse about a template across interwiki boundaries. Small 'front end' Shell or convience templates {{{{#ifeq:tlxw|tlxw|tlxw|Tlxw}}{{#if:|
|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} and {{{{#ifeq:tlxm|tlxm|tlxm|Tlxm}}{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} are typing-aid templates available at Meta for automatic substitution in discussions about templates on Wikipedia or Meta.
- This usage also applies to interwiki capable template variations
- {{Tlxc}} -- which links to templates on Wikimedia Commons (The Commons).
- {{Tlxm}} -- which links to templates on Meta
- {{Tlxw}} -- which links to templates on Wikipedia
[edit] Documentation
{{Tlx/doc}} is a generalization of {{{{#ifeq:tl|tl|tl|Tl}}{{#if:x| |x }}{{#if:| | }}{{#if:| | }}{{#if:| | }}{{#if:| |... }}}}, {{{{#ifeq:tlp|tlp|tlp|Tlp}}{{#if:x| |x }}{{#if:y| |y }}{{#if:| | }}{{#if:| | }}{{#if:| |... }}}}, etcetera with arguably better readable output. This depends on the browser, but too narrow uses of "{", "|", "}" in conjunction with links can be hard to read. {{#ifeq:Tlx/doc|Tlx/doc||
Usage
- {{Tlx/doc|template name}}
- {{Tlx/doc|template name|param}}
- {{Tlx/doc|template name|1|2|3}}
- {{Tlx/doc|template name|1|2|3|more}}
- {{Tlx/doc|template name|param=value}}
Up to three placeholders for parameters of the specified template}}
[edit] Examples
{{#ifeq:Lane Co Oregon|Wikipedia|| {{#ifeq:Lane Co Oregon|Meta||
- Note
- On the source sister projects, en.wikipedia and Meta, X0, X1, X2,..., X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other Sister projects.
}}}}
Code | Result | Remark |
---|---|---|
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x0|
|x0 }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x0|x0|x0|x0}}{{#if:|
|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x1|
|x1 }}{{#if:one| |one }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x1|x1|x1|x1}}{{#if:one|
|one }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x2|
|x2 }}{{#if:one| |one }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x2|x2|x2|x2}}{{#if:one|
|one }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x3|
|x3 }}{{#if:1|2|3| |1|2|3 }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x3|x3|x3|x3}}{{#if:1|
|1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x4|
|x4 }}{{#if:1|2|3| |1|2|3 }}{{#if:4| |4 }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x4|x4|x4|x4}}{{#if:1|
|1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:| |... }}}} | up to 5 parameters, then ... |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x4|
|x4 }}{{#if:1|2|3|4| |1|2|3|4 }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x4|x4|x4|x4}}{{#if:1|
|1 }}{{#if:2| |2 }}{{#if:3|4| |3|4 }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | | for more |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x1|
|x1 }}{{#if:x=u| |x=u }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x1|x1|x1|x1}}{{#if:|
|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | = won't work |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x1|
|x1 }}{{#if:x=u| |x=u }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x1|x1|x1|x1}}{{#if:x=u|
|x=u }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | = is okay |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x1|
|x1 }}{{#if:<nowiki>x=u</nowiki>| |<nowiki>x=u</nowiki> }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x1|x1|x1|x1}}{{#if:x=u|
|x=u }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | sticky nowiki is okay |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x2|
|x2 }}{{#if: | | }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x2|x2|x2|x2}}{{#if: |
| }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | empty won't work |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x2|
|x2 }}{{#if: | |  }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x2|x2|x2|x2}}{{#if: |
| }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} |   is okay |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x2|
|x2 }}{{#if: | | }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x2|x2|x2|x2}}{{#if: |
| }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | is okay |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x2|
|x2 }}{{#if: | two| | | two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x2|x2|x2|x2}}{{#if: | two|
| | two }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | | is okay |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x2|
|x2 }}{{#if: {{!}} two| | {{!}} two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x2|x2|x2|x2}}{{#if: | two|
| | two }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:!|!|!|!}}{{#if:|
|{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} is dubious |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x2|
|x2 }}{{#if:2=| |2= }}{{#if:3=two| |3=two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x2|x2|x2|x2}}{{#if:|
| }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | empty really doesn't work |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x2|
|x2 }}{{#if:2=one| |2=one }}{{#if:two| |two }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x2|x2|x2|x2}}{{#if:two|
|two }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | two clobbers 2=one |
{{{{#ifeq:tlx|tlx|tlx|Tlx}}{{#if:x2|
|x2 }}{{#if:3=two| |3=two }}{{#if:2=one| |2=one }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | {{{{#ifeq:x2|x2|x2|x2}}{{#if:one|
|one }}{{#if:two| |two }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |... }}}} | right to left okay |