Template:Template link with parameters/doc: Difference between revisions

Content deleted Content added
m update transclusion count
Examples: header
 
(10 intermediate revisions by 8 users not shown)
Line 1:
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{high-riskuse| 177,000+69435 }}
{{template shortcut|tlp}}
This is the {{tl|tlp}} ('''template link with parameters''' (or {{tlp|tlp}}) template.
It can be used in documentation and talk page discussions to show how a template name would be used in code.
Line 20:
This template belongs to a whole family of similar templates. See the [[#See also|see also]] section below for some of them. For instance, when writing documentation you might want to avoid a lot of unnecessary links, since it decreases readability&nbsp;– i.e. on the first occurrence of a template name, use {{tl|tl}}, {{tlp|tlp}} or {{Tlx|Tlx}} and thereafter use {{tlf|tlf}}, {{tlc|tlc}} or {{tld|tld}}.
===Examples===
{{Aligned table |cols=3 |class=wikitable |row1header=y
| '''Code''' | '''Output''' | '''Comments'''
| {{tlc|tlp}} | {{tlp}} | Shows its own syntax.
| {{tlc|tlp|name}} | {{tlp|name}} |
Line 50:
|row13style=color:red;
| {{tlc|tlp|name|3=2=1=a|4=last<nowiki>{{=}}</nowiki>b}}
| {{tlp|name|<!--2=1=a|-->last{{=}}b}}
| The named parameter ("{{para|last}}") clobbered the prior one ("{{para|2}}"). Again, '''all''' subsequent parameters after a numbered parameter ''must also'' be numbered...
 
Line 58:
}}
 
===See also===
* {{tl|tl7}}
{{Template-linking templates}}
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- CATEGORIES BELOW THIS LINE, PLEASE: -->
[[Category:Internal template-link templates]]
[[Category:Typing-aid templates]]
}}</includeonly>
}}
</includeonly>