සැකිල්ල:Template link expanded with italic/උපදෙස්
මෙය "සැකිල්ල:Template link expanded with italic" සඳහා උපදෙස් උප පිටුවක් වේ (සැකිල්ල සඳහා එම පිටුව වෙතට යොමු වන්න). මෙහි ඇත්තේ භාවිත තොරතුරු, ප්රවර්ග, සහ මූලික සැකිල්ල පිටුවට අදාළ නොවන වෙනත් අන්තර්ගතය වේ. |
Usage
[සංස්කරණය]This template is a {{tl}}
-style template-link tag that accepts and italicizes parameters. It's the same as {{tlx}}
except that the template parameters are shown in italics. Its main use is in template documentation, to give example input where the parameters are unnamed sequential ones and we're showing variable, sample input. It really should mark up the parameter with <var>...</var>
, not just typographic italics, but the underlying Template:Tlg doesn't have an option to execute that markup (yet).
Examples
[සංස්කරණය]{{Tlxi|Template|first parameter|second|third|...|eleventh}}
→{{Template|first parameter|second|third|...|eleventh}}
{{Tlxi|Template|2=first parameter|3=second|4=third|...|12=eleventh}}
→{{Template|first parameter|second|third|...}}
if they might contain "=" signs (note the off-by-one notation – parameter 1 remains the name of the template){{Tlxi|Template|<nowiki>first|second|...|999th</nowiki>}}
→{{Template|first|second|...|999th}}
(for more than 10 parameters)
If Template is to be passed more than nine parameters (using up to the tenth of {{tlxi}}'s own parameters), the remaining parameters have to be baked into the actual eleventh parameter of {{tlxi}}:
{{Tlxi|Template|first parameter|second|third|fourth|fifth|sixth|seventh|eighth|ninth|<nowiki>tenth|eleventh|twelfth|thirteenth|...</nowiki>}}
- or
{{Tlxi|Template|first parameter|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth{{!}}eleventh{{!}}twelfth{{!}}thirteenth{{!}}...}}
- or
{{Tlxi|Template|2=first parameter|3=second|4=third|5=fourth|6=fifth|7=sixth|8=seventh|9=eighth|10=ninth|11=<nowiki>tenth|eleventh|twelfth|thirteenth|...</nowiki>}}
- →
{{Template|first parameter|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|eleventh|twelfth|thirteenth|...}}
If a twelfth parameter is passed to {{tlxi}} (i.e., an 11th to the Template it calls in parameter 1), that parameter's value will be output as "…" and subsequent parameters ignored.
The rest of the documentation is for {{tlx}}, which works the same way.
මෙය "සැකිල්ල:Template link expanded with italic" සඳහා උපදෙස් උප පිටුවක් වේ (සැකිල්ල සඳහා එම පිටුව වෙතට යොමු වන්න). මෙහි ඇත්තේ භාවිත තොරතුරු, ප්රවර්ග, සහ මූලික සැකිල්ල පිටුවට අදාළ නොවන වෙනත් අන්තර්ගතය වේ. |
This template is used on 10,000+ pages. To avoid large-scale disruption and unnecessary server load, any changes should first be tested in the template sandbox or a user subpage. The tested changes can then be added in one single edit to this template. Please consider discussing any changes on the talk page before implementing them. |
මෙම සැකිල්ල ලුවා භාවිතා කරයි: |
{{tlx|template|first parameter|second|third|fourth|etc}}
becomes → {{template|first parameter|second|third|fourth|etc}}
Purpose and naming: Mnemonically 'Template list expanded'... named after {{tl}}
'Template list'
භාවිතය
[සංස්කරණය]- {{Template link expanded with italic/උපදෙස්|template name}}
- {{Template link expanded with italic/උපදෙස්|template name|param}}
- {{Template link expanded with italic/උපදෙස්|template name|param=value}}
- {{Template link expanded with italic/උපදෙස්|template name|param=value}}
- This template takes a template-name and an optional number of associated parameters (or 'pass parameters'), and aggregates them into an 'example demonstration' of how the template might be used. It's primary use is in instruction and documentation such as this passage.
- Additionally, tlx can be used to demonstrate templates on other sister projects.
උදාහරණ
[සංස්කරණය]Markup | Displays | Remarks |
---|---|---|
{{tlx|tlx}}
|
{{tlx}}
|
|
{{tlx|w:tlx}}
|
{{w:tlx}}
|
Interwiki template example |
{{tlx|subst:tlx}}
|
{{subst:tlx}}
|
Template substitution example |
{{tlx|tlx|two}}
|
{{tlx|two}}
|
Empty parameter example |
{{tlx|tlx}}
|
{{tlx}}
|
Named parameter example |
{{tlx|tlx|2=1}}
|
{{tlx|1}}
|
Parameter shown without number parameter name |
{{tlx|tlx|2=1}}
|
{{tlx|2=1}}
|
Use = to display number parameter names |
{{tlx|tlx}}
|
{{tlx|2=1}}
|
{{=}} also works |
{{tlx|tlx|2<nowiki>=</nowiki>1}}
|
{{tlx|2=1}}
|
sticky nowiki also works |
{{tlx|tlx|2=one|two}}
|
{{tlx|two}}
|
two clobbers 2=one |
{{tlx|tlx|3=two|2=one}}
|
{{tlx|one|two}}
|
right to left okay |