Share to:

Predloga:Tlc/dok

This is the {{tlc}} template.

This page also provides the full documentation for the templates {{tld}} and {{tlf}}, which work almost exactly identically.

Purpose and naming

When a template name with braces is to be shown in documentation, the braces have to be escaped in some way so it doesn't become an actual call to the template. Instead of using <nowiki></nowiki> tags you can write it more simply and concisely by using the {{tlc}}, {{tld}}, or {{tlf}} templates.

These templates work similarly to {{tl}} and {{tlx}}, but don't make the template name into a link. When writing documentation you might want to avoid a lot of unnecessary links, since they can decrease readability. So on the first occurrence of a template name use {{tl}} or {{tlx}}, and then use {{tlc}}, {{tld}} or {{tlf}} thereafter.

Template Mnemonic Format differentiation
{{tlc}} Template link code Uses the <code>...</code> tags meant for showing programming code.
{{tld}} Template link dialup-host Uses the <tt>...</tt> tags sometimes used for showing programming code. Essentially the non-linking equivalent of {{tlx}}.
{{tlf}} Template link format-normal Uses proportional-spaced font as is normal for regular text rather than a monospace font as typically used with programming code. Essentially the non-linking equivalent of {{tlp}}.

The three names were based on {{tl}} template link', despite the fact that, unlike the actual {{tl}} template, these three don't include an actual link. The mnemonics for {{tld}} and {{tlf}} were invented after the fact, since the template creator used the single letters still available rather than the preferred {{tlt}} (using <tt>) and {{tln}} (using "normal", non-coded text style) monikers.

Basic operation

Here is how these templates look. Code is to the left; actual rendering to the right:

{{tlc|name|parameters}} = {{name|parameters}}
{{tld|name|parameters}} = {{name|parameters}}
{{tlf|name|parameters}} = {{name|parameters}}

Use with editprotected templates

Most Wikipedia users and even editors will have little or no need for use (or knowledge) of these templates. You will find them of more use if you are a writer or documenter of templates. However, editors may be pointed here when attempting to deal with edit requests on pages which have been protected in some way.

Pages which have been protected can't be edited by every user, but would-be editors can request specific changes on the corresponding Discussion page. An editor requesting a change to a semi-protected page, for example, would add the {{editsemiprotected}} template, followed by their request, to the Talk page. The {{editsemiprotected}} template expands to a texty notice which includes the instruction "Replace the {{editsemiprotected}} template with {{tlf|editsemiprotected}} when the request has been accepted or rejected." An empowered editor acting on the request would then change the template per this instruction.

The desired effect is to replace the {{editsemiprotected}} template (with its big, eye-catching box of information) by the name of the template, merely showing that the template had been there, and acted upon. The use of the {{tlf}} template means that the template should appear in a normal, proportional font-face, as in "{{editsemiprotected}}".

Documentation

Functional details

  • 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. Its primary use is in instruction and documentation.
  • Specifics here???
  • Features of {{tlc}}, {{tld}} and {{tlf}}:
    • They show a template name and up to eight parameters.
    • They also show empty parameters. (See examples hereafter.)
    • They prevent line wraps in their output.

Usage

{{Tlc|Template|first_parameter|second|third|fourth|...|eighth}}{{Template|first_parameter|second|third|fourth|fifth|sixth|seventh|eighth}}

{{Tld|Template|first_parameter|second|third|fourth|...|eighth}}{{Template|first_parameter|second|third|fourth|fifth|sixth|seventh|eighth}}

{{Tlf|Template|first_parameter|second|third|fourth|...|eighth}}{{Template|first_parameter|second|third|fourth|fifth|sixth|seventh|eighth}}

Examples

Note: Wikitables make the <code></code> tags transparent, unfortunately, so the "code colouring" is missing in these examples.

CodeResultComment
{{tlc}} Napaka Lua v Modul:Template_link_general v vrstici 132: attempt to concatenate local 'titlePart' (a nil value). Shows its own syntax.
{{tlc|name}} {{name}}
{{tlc|name|one}} {{name|one}}
{{tlc|name|one|two}} {{name|one|two}}
{{tlc|name|a|b|c|d|e|f|g|h|i|j}} {{name|a|b|c|d|e|f|g|h|i}} Shows up to eight parameters. The rest are dropped.
{{tlc|name|three|four}} {{name|three|four}} Also shows empty parameters.
{{tlc|name|three}} {{name|three}} Even shows empty parameters that come in the end.
{{tlc|name|one=a|two=b}} {{name}} The use of equal signs is a problem, but there is a fix; see next row.
{{tlc|name|one{{=}}a|two{{=}}b}} {{name|one=a|two=b}} Use {{=}} in place of an equal sign, so that it gets rendered properly.
{{tlc|name|{{IPA|/tʃ/}}|two}} {{tlc|name|/tʃ/|two}} Nested template calls also cause problems ...
{{tlc|name|{{tlf|IPA|/tʃ/}}|two}} {{tlc|name|{{IPA|/tʃ/}}|two}} ... but there are ways to get around this issue, also.
{{tlc|name|{{((}}IPA{{!}}/tʃ/{{))}}|two}} {{tlc|name|{{IPA|/tʃ/}}|two}} ... another way to do the same thing, using {{((}}, {{!}} and {{))}} to insert literal {{, | and }}, respectively.

An alternative to using constructs such as {{=}} and {{tlf|...}} to prevent characters from getting interpreted syntactically is to use <code><nowiki>...</nowiki></code>, which will prevent all characters from being interpreted. For example, in place of

{{tlc|name|one{{=}}{{tlf|IPA|/tʃ/}}|two}}

you can use

<code><nowiki>{{name|one={{IPA|/tʃ/}}|two}}</nowiki></code>

Both render as

{{name|one={{IPA|/tʃ/}}|two}}

If a vertical display with parameters on their own lines is desired, this can also be laid out manually in this manner, or more rapidly done with <pre>...</pre>.

Here are the codes to emulate {{tlf}}, {{tld}} and {{tlc}} using <nowiki>:

Using templates: Using <nowiki>: Rendered result:
{{tlf|name|one{{=}}a|two{{=}}b}} <nowiki>{{name|one=a|two=b}}</nowiki> {{name|one=a|two=b}}
{{tld|name|one{{=}}a|two{{=}}b}} <tt><nowiki>{{name|one=a|two=b}}</nowiki></tt> {{name|one=a|two=b}}
{{tlc|name|one{{=}}a|two{{=}}b}} <code><nowiki>{{name|one=a|two=b}}</nowiki></code> {{name|one=a|two=b}}

See also

These tables: prikaži · pogovor · uredi · zgodovina

Splošno oblikovenje

Primerjava predlog za povezovanje predlog glede na sloge ustvarjenega besedila in ustvarjenih povezav
Slog besedila ↓ {{tlg}} opcije[op. 1]
za dosego sloga besedila
Slog povezave
Povezano Nepovezano Povezano z subst Nepovezano z subst Povezano z vključenimi oklepaji Povezano z alternativnim besedilom
{{tlg}} options[op. 1]
za dosego sloga povezave
N/A DEFAULT nolink=yes subst=yes nolink=yes|subst=yes braceinside=yes alttext=Foo
2=Foo
normal DEFAULT {{tlg}}[op. 1]
{{tl}}
{{tlp|1|2|...}}[op. 2]
{{Predloga:tlu}}[op. 3]
{{tlf}}[op. 2]
<template link>
{{subst:tls}}
{{subst:Predloga:tlsu}}[op. 3]
Predloga:Tlsf[op. 2]
<template link>
{{tn}} {{tla}}
koda code=yes {{tl2}}
{{tlx}}
Predloga:Tlxu[op. 3]
{{tlc}}[op. 2]
<template link>
{{tnull}}<template link>
{{subst:tlxs}} {{subst:tlsc}}[op. 2]
<template link>
N/A
monospace plaincode=yes[op. 4] N/A Predloga:Tltss[op. 5] N/A
kbd kbd=yes[op. 5]
krepko bold=yes {{tlb}} N/A
krepko+koda bold=yes|code=yes {{tlxb}}
ležeče+koda italic=yes|code=yes {{tlxi}}
  1. 1,0 1,1 1,2 {{tlg}} je najbolj splošna predloga, ki dovoljuje katerokoli kombinacijo sloga besedila in/ali možnosti povezave.
  2. 2,0 2,1 2,2 2,3 2,4 Preprečuje prelome besedila tako, da ga postavi znotraj označevalcev <span class="nowrap">...</span>.
  3. 3,0 3,1 3,2 Omogoča povezave do predlog v kateremkoli imenskem prostoru.
  4. {{tlg|plaincode=yes}} uporablja <code style="border:none; background-color:transparent;">...</code>.
  5. 5,0 5,1 Izpiše monospac pisavo z uporabo <span style="font-family:monospace;">...</span>.

Druge predloge za oblikovanje

Predloge, ki ustvarjajo specializirane učinke oblikovanja za dane predloge, module ali parametre
Zgled kode Učinek Opombe
{{Tj|Hatnote|Neko besedilo|selfref: yes|category: no|lang: fr}} Predloga:Tj Podpira barve, nadomestna besedila, poimenovane in nepoimenovane parametre
<syntaxhighlight lang="wikitext">
{{Hatnote
   | Neko besedilo
   | selfref = yes
   | category = no
   | lang = fr
}}
</syntaxhighlight>
{{Hatnote
    | Neko besedilo
    | selfref = yes
    | category = no
    | lang = fr
}}
Enako kot zgoraj
{{Tji|Hatnote|Neko besedilo|selfref: yes|category: no|lang: fr}} {{Hatnote|Neko besedilo|selfref=yes|category=no|lang=fr}} Podpira barve, nadomestna besedila, poimenovane in nepoimenovane parametre
<syntaxhighlight lang="wikitext" inline>{{Hatnote|Neko besedilo|selfref=yes|category=no|lang=fr}}</syntaxhighlight> {{Hatnote|Neko besedilo|selfref=yes|category=no|lang=fr}} Enako kot zgoraj
{{tl2|Hatnote|lang=fr}} {{hatnote}} Podpira povezave na sestrske projekte (npr., fr:Hatnote)
{{demo|<nowiki>{{Hatnote|lang=fr|Neko besedilo}}</nowiki>}}
{{hatnote|lang=fr|Neko besedilo}}

Izpiše kodo in zgled
{{tln|Hatnote}} Predloga:Tln Ustvari običajno povezavo do predloge
{{elc|Predloga:Hatnote}}
{{elc|Predloga:Hatnote|Hatnote}}
[[Predloga:Hatnote]]
[[Predloga:Hatnote|Hatnote]]
Oblikuje wikipovezavo s pomočjo navpičnice
{{ml|Zgled|hello}} {{#invoke:Zgled|hello}} Nasprotno predlogi {{tl}} za povezovanje z Lua moduli
{{mfl|Zgled|hello}} Predloga:Mfl Similar to {{ml}}, but expects the function to be documented and creates a link to the corresponding section
{{mlx|Zgled|hello}} {{#invoke:Zgled|hello}} Counterpart to {{tlx}} for linking to Lua modules
{{ml-lua|Module:Example}} Predloga:Ml-lua Link to Lua modules and built-in libraries, showing Lua code.
{{para|title|<var>book title</var>}} |title=book title Oblikuje parametre predloge za izpis, z ali brez vrednosti
{{sclx|LASTING}} Predloga:Sclx Vzame sufiks bližnjice v imenskem prostoru projekta in jo izpiše z oklepaji ter WP: alias v označevalcu <code>...</code>.
{{tag|ref}}
{{xtag|templatedata}}
<ref>...</ref>
<templatedata>
Oblikuje [X]HTML označevalce; lahko doda vsebino, izbere začetno, končno ali samostojno zaključno oznako
{{dtl|Ping project}} Predloga:Dtl Wikidata ekvivalent predloge {{tl}}
{{pf|if}}
{{pf|if|{{{1}}}|true|false}}
{{#if}}
{{#if:{{{1}}}|true|false}}
Parser funkcija ekvivalent predlogi {{tl}}
{{magic word|uc:}} {{uc:}} Magic word links

Z uporabnimi povezavami

Predloge, ki ustvarjajo uporabne povezave za dano predlogo (Tukaj se za zgled uporablja predloga Hatnote)
Zgled kode Učinek
{{lt|Hatnote}} Predloga:Hatnote (uredi|pogovor|zgodovina|povezave|opazuj|dnevnik)
{{lts|Hatnote}} Predloga:Hatnote(uredi pogovor povezave zgodovina)
{{t links|Hatnote}} Predloga:Hatnote (uredi|pogovor|zgodovina|povezave|/dok|/podstr|/pesk|/pesk razlika|/testp)
{{tfd links|Hatnote}} Predloga:Tfd links
{{tetl|Hatnote}} Predloga:Tetl
{{tsetl|Hatnote}} Predloga:Tsetl
{{ti|Hatnote}} Predloga:Hatnote (pogovor, povezave, uredi)
{{tic|Hatnote}} Predloga:Tic
{{tim|Hatnote}} m:Template:Hatnote (pogovor, povezave, uredi)
{{tiw|Hatnote}} Predloga:Hatnote (pogovor, povratne povezave, uredi)
{{tlt|Hatnote}} {{Hatnote}} (pogovor)
{{ttl|Hatnote}} {{Hatnote}} (pg/pv)
{{twlh|Hatnote}} Predloga:Twlh


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.
Prefix: a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9

Portal di Ensiklopedia Dunia

Kembali kehalaman sebelumnya