سانچو:Tlg

کليل ڄاڻ چيڪلي، وڪيپيڊيا مان
Jump to navigation ڳولا ڏانهن هلو
Documentation icon دستاويز سانچو[نمائش] [سنواريو] [تاريخچو] [تطهير]

{{[[سانچو:tlg|tlg]]}} (abbreviating "[t]emplate [l]ink (with) [g]eneral (options)") is a generalised version of the {{[[سانچو:tl|tl]]}} ("template link") template. It can be used to replace or implement {{tl}} and related templates such as {{[[سانچو:tlb|tlb]]}}, {{[[سانچو:tlx|tlx]]}}, etc.

Parameters[سنواريو]

Named

With the exception of alttext, {{tlg}}'s named parameters are toggles that are either omitted (default) or activated (by being assigned a value such as "on", "yes", "true", "include", etc.). They may be included in any order (see Examples below):

Parameter Action As in
braceinside Include innermost braces as part of the template link {{[[سانچو:tlw|tlw]]}}
bold
boldlink
boldname
Renders the template link/name in bold {{[[سانچو:tlb|tlb]]}} {{[[سانچو:tlx|tlx]]}} etc.
code Display output using the (monospaced) HTML <code> formatting {{[[سانچو:tlc|tlc]]}} {{[[سانچو:tlx|tlx]]}} etc.
italic
italics
Display any parameters accompanying the template link/name in italic/s {{[[سانچو:tlxi|tlxi]]}}
nolink Don't render the template name as a link {{[[سانچو:tln|tln]]}}
nowrap Prevent the insertion of line breaks (word wrap) in the output
subst Include a subst: prefix before the template link/name {{[[سانچو:tls|tls]]}}
|alttext=[text] Use [text] as the label for the template link {{[[سانچو:tla|tla]]}}
Unnamed

{{tlg}} may take up to ten unnamed parameters as parameters accompanying the template link (or name); see Examples below.

Examples[سنواريو]

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 Output Remarks
{{tlg|Abc}} {{[[:سانچو:Abc|Abcسانچو:!))}}
{{tlg|abC}} {{[[:سانچو:AbC|abCسانچو:!))}} template names are case-sensitive
{{tlg|abc}} {{[[:سانچو:Abc|abcسانچو:!))}} first letter is case-insensitive though
{{tlg|x0}} {{[[:سانچو:X0|x0سانچو:!))}}
{{tlg|x0|code=on}} {{[[:سانچو:X0|x0سانچو:!))}} <code> style
{{tlg|x0|plaincode=on}} {{[[:سانچو:X0|x0سانچو:!))}} plaincode style
{{tlg|x0|bold=on}} {{[[:سانچو:X0|x0سانچو:!))}} bold link/name
{{tlg|x1|one|italic=on}} {{[[:سانچو:X1|x1سانچو:!))|one}} parameter/s in italics
{{tlg|x0|nolink=on}} {{x0}}
{{tlg|x0|subst=on}} {{subst:[[:سانچو:X0|x0سانچو:!))}}
{{tlg|x0|braceinside=on}} {[[:سانچو:X0|{x0}سانچو:!))}
{{tlg|x0|alttext=x0 link}} {{[[:سانچو:X0|x0 linkسانچو:!))}}
{{tlg|x0|bold=on|code=on|braceinside=on}} {[[:سانچو:X0|{x0}سانچو:!))} No reason you can't combine multiple parameter settings
{{tlg|x1|one}} {{[[:سانچو:X1|x1سانچو:!))|one}}
{{tlg|x2|one|two}} {{[[:سانچو:X2|x2سانچو:!))|one|two}}
{{tlg|x2|bold=on|code=on|one|two}} {{[[:سانچو:X2|x2سانچو:!))|one|two}} Can combine named and anonymous parameters …
{{tlg|x2|one|two|bold=on|code=on}} {{[[:سانچو:X2|x2سانچو:!))|one|two}} … in any order …
{{tlg|x2|one|code=on|two|bold=on|three}} {{[[:سانچو:X2|x2سانچو:!))|one|two|three}} … even intermixed …
{{tlg|x2|one|code=on|two|bold=on|three|italic=on}} {{[[:سانچو:X2|x2سانچو:!))|one|two|three}} … with many different configurations.
{{tlg|x3|1|2|3|4|5|6|7|8|9|10}} {{[[:سانچو:X3|x3سانچو:!))|1|2|3|4|5|6|7|8|9|10}}
{{tlg|x4|1|2|3|4|5|6|7|8|9|10|11}} {{[[:سانچو:X4|x4سانچو:!))|1|2|3|4|5|6|7|8|9|10|…}} up to 10 parameters, then …
{{tlg|x5|1|2|3|4|5|6|7|8|9|10&#124;11}} {{[[:سانچو:X5|x5سانچو:!))|1|2|3|4|5|6|7|8|9|10|11}}
&#124; for more
{{tlg}} {{[[:سانچو:Tlg|Tlgسانچو:!))}} with no arguments, the current page name is substituted
{{tlg|x1|x=u}} {{[[:سانچو:X1|x1سانچو:!))|x=u}} = won't work
{{tlg|x1|x&#61;u}} {{[[:سانچو:X1|x1سانچو:!))|x=u}}
&#61; is okay
{{tlg|x1|x{{=}}u}} {{[[:سانچو:X1|x1سانچو:!))|x=u}}
{{=}} is okay
{{tlg|x1|x<nowiki>=</nowiki>u}} {{[[:سانچو:X1|x1سانچو:!))|x=u}}
sticky nowiki is okay
{{tlg|x2||two||}} {{[[:سانچو:X2|x2سانچو:!))||two||}} empty parameters work too, even at the end
{{tlg|x2|2=one|two}} {{[[:سانچو:X2|x2سانچو:!))|2=one|two}} two clobbers 2=one
{{tlg|x2|3=two|2=one}} {{[[:سانچو:X2|x2سانچو:!))|3=two|2=one}}
right to left okay
Unlimited parameters as one nowiki string

{{tlg|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}

See also[سنواريو]

General-purpose formatting[سنواريو]

  • 1 {{tlg}} is the most general, allowing any combination of text style and/or link style options.
  • 2 Prevents wrapping of text by placing it inside <span class="nowrap">...</span> tags.
  • 3 Uses monospace font but not <code>...</code>.
  • 4 Allows links to templates in any namespace.

Other formatting templates[سنواريو]

Code 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>}} سانچو:Demo Shows code and example
{{xpd|Hatnote|Some hatnote text}} سانچو:Xpd1 Shows code, example and a link to expand the template code
{{para|title|<var>book title</var>}} |title=book title Formats template parameters for display, with or without values

With utility links[سنواريو]

Code example Effect
{{lts|Hatnote}} سانچو:Hatnote([1] بحث روابط تاریخچہ)
{{t links|Hatnote}} Hatnote (edit talk history links # /subpages /doc /doc edit /sbox /sbox diff /test)
{{tfd links|Hatnote}} سانچو:Tfd links
{{tiw|Hatnote}} Template:hatnote (backlinks, edit)
{{tltt|Hatnote}} سانچو:Tltt
{{tetl|Hatnote}} سانچو:Tetl
{{tsetl|Hatnote}} سانچو:Tsetl
{{ti|Hatnote}} Template:Hatnote (talk, links, edit)
{{tic|Hatnote}} Template:Hatnote (talk, links, edit)
{{tiw|Hatnote}} Template:Hatnote (backlinks, edit)
{{tlt|Hatnote}} {{Hatnote}} (talk)
{{ttl|Hatnote}} {{Hatnote}} (t/l)
{{twlh|Hatnote}} Template:Hatnote (links, talk)