თარგი:Tlg
[ხილვა] [რედაქტირება] [ისტორია] [განახლება]
დოკუმენტაცია
{{tlg}} (abbreviating "[t]emplate [l]ink (with) [g]eneral (options)") is a generalised version of the {{tl}} ("template link") template. It can be used to replace or implement {{tl}} and related templates such as {{tlb}}, {{tlx}}, etc.
Parameters
With the exception of თარგი:Mono, {{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}} |
bold boldlink boldname |
Renders the template link/name in bold | {{tlb}} {{tlx}} etc. |
code | Display output using the (monospaced) HTML <code> formatting | {{tlc}} {{tlx}} etc. |
italic italics |
Display any parameters accompanying the template link/name in italic/s | {{tlxi}} |
nolink | Don't render the template name as a link | {{tln}} |
nowrap | Prevent the insertion of line breaks (word wrap) in the output | |
subst | Include a subst: prefix before the template link/name | {{tls}} |
|alttext=[text] | Use [text] as the label for the template link | {{tla}} |
{{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|11}} | {{[[:თარგი:X5|x5თარგი:!))|1|2|3|4|5|6|7|8|9|10|11}} | | 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=u}} | {{[[:თარგი:X1|x1თარგი:!))|x=u}} | = 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>}}