Modèle:Tlg/doc

De Didaquest
Aller à la navigationAller à la recherche

{{tlg}} (abbreviating "[t]emplate [l]ink Modèle:Small [g]eneral Modèle:Small") is a generalised version of the {{tl}} ("template link") template. It can be used to replace or implement Modèle:Tlf and related templates such as {{tlb}}, {{tlx}}, etc.

Parameters

Named

With the exception of Modèle:Mono, Modèle:Tlf'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 HTML [[HTML element#code|Modèle:Tag]] tags (monospaced font) {{tlc}}, {{tlx}}, etc.
plaincode Uses Modèle:Tag
kbd Display output using HTML [[HTML element#kbd|Modèle:Tag]] tags (monospaced font) {{tltt}}, {{tltt2}}, 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 {{tlp}}, {{tlf}}, etc.
nowrapname Prevent word wrapping in the output of template name/link (parameters will wrap if needed)
subst Include a subst: prefix before the template link/name {{tls}}
|alttext=[text] Use [text] as the label for the template link {{tla}}

Unnamed

Modèle:Tlf 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.

Modèle:Aligned table

Wrapping of long names (default)
Code Output
{{tlg|long template name that would wrap to new line|this is a long value for the 1st parameter that would wrap}} {{Modèle:!((:Modèle:Long template name that would wrap to new line|long template name that would wrap to new lineModèle:!))|this is a long value for the 1st parameter that would wrap}}
Wrapping of long names (nowrap=on)
Code Output
{{tlg|nowrap=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}} {{Modèle:!((:Modèle:Long template name that would wrap to new line|long template name that would wrap to new lineModèle:!))|long value for the 1st parameter that would wrap}}
Wrapping of long names (nowrapname=on)
Code Output
{{tlg|nowrapname=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}} {{Modèle:!((:Modèle:Long template name that would wrap to new line|long template name that would wrap to new lineModèle:!))|long value for the 1st parameter that would wrap}}

See also

Modèle:Navbar

General-purpose formatting


Modèle:Plainlist

Other formatting templates

Code example Effect Notes
{{tl2|Hatnote|lang=fr}} Modèle:Tl2 Supports linking to sister projects (e.g., fr:Hatnote)
{{tlu|User:Ahunt/SSHFS}} Modèle:Tlu Supports linking to any namespace
{{demo|<nowiki>{{Hatnote|lang=fr|Some text}}</nowiki>}} Modèle:Demo Shows code and example
{{xpd|Hatnote|Some hatnote text}} Modèle:Xpd 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
{{elc|Template:Hatnote}}
{{elc|Template:Hatnote|Hatnote}}
Modèle:Elc
Modèle:Elc
Formats wikilink, with optional piped link text and blended suffix
{{tag|ref}}
{{xtag|templatedata}}
Modèle:Tag
Modèle:Xtag
Formats [X]HTML tags; can add content, choose opening, closing, or self-closing

With utility links

Code example Effect
{{lts|Hatnote}} Modèle:Lts
{{t links|Hatnote}} Modèle:T links
{{tfd links|Hatnote}} Modèle:Tfd links
{{tiw|Hatnote}} Modèle:Tiw
{{tltt|Hatnote}} Modèle:Tltt
{{tetl|Hatnote}} Modèle:Tetl
{{tsetl|Hatnote}} Modèle:Tsetl
{{ti|Hatnote}} Modèle:Ti
{{tic|Hatnote}} Modèle:Tic
{{tiw|Hatnote}} Modèle:Tiw
{{tlt|Hatnote}} Modèle:Tlt
{{ttl|Hatnote}} Modèle:Ttl
{{twlh|Hatnote}} Modèle:Twlh