Predloga:Module link
Uporablja Lua: |
Predloga:Ml (uredi|pogovor|zgodovina|povezave|opazuj|dnevnik) is used to display a module name as a link surrounded by braces with the {{#invoke}} parser function, thus showing the module name as code rather than actually invoking it. Its primary use is in instruction and documentation where it is used to refer to a module by name without invoking it. It is also supports the definition of a function and parameters.
Examples
[uredi kodo]Code | Result | Notes |
---|---|---|
Predloga:Tji | {{#invoke:Zgled|function}} | Usage without function name. This does not produce a usable invocation. |
Predloga:Tji | {{#invoke:Zgled|hello}} | Usage with a function name. |
Predloga:Tji | {{#invoke:Zgled|count_fruit|bananas=10|kiwis=5}} | Usage with a function name and parameters. |
Predloga:Tji | {{#invoke:Zgled|count_fruit|Fred|bananas=10|apples=5}} | Usage with a function name and parameters, using {{=}}. |
Predloga:Tji | {{#invoke:Zgled}} | Omits the function name |
TemplateData
[uredi kodo]TemplateData za Module link
This template displays a module name as a link surrounded by braces with the {{#invoke}} parser function, thus showing how the module name would be used in code. Its primary use is in instruction and documentation.
Parameter | Opis | Vrsta | Stanje | |
---|---|---|---|---|
module name | 1 | the module name without the namespace prefix “Module:”, which is added automatically | Niz | zahtevano |
function name | 2 | the function name within the module to call | Niz | zahtevano |
parameter 1 | 3 | the name (and value) of the first parameter, use {{=}} to add an equal sign | Niz | neobvezno |
parameter 2 | 4 | the name (and value) of the second parameter, use {{=}} to add an equal sign | Niz | neobvezno |
parameter 3 | 5 | the name (and value) of the third parameter, use {{=}} to add an equal sign | Niz | neobvezno |
See also
[uredi kodo]- {{mfl}} - Similar function but creates a link to the function paragraph in the documentation.
- {{mlx}} - Similar function but surrounded in
<code>...</code>
tags. - {{tl}} - A version of this template for templates instead of modules.
Slog povezave | Povezano | Nepovezano | Povezano z subst | Povezano z vključenimi oklepaji | Povezano z alternativnim besedilom | |
---|---|---|---|---|---|---|
Slog besedila | {{tlg}} option
|
— | nolink=yes
|
subst=yes
|
braceinside=yes
|
alttext=FOO
|
Normal | — | {{tl}} · {{tlp}} · {{tlg}}
|
{{tlf}}
|
{{tls}} · {{tlsp}}
|
{{tn}}
|
{{tla}}
|
Teletype
|
tt=yes
|
{{tlx}}
|
{{tld}} · {{tnull}}
|
{{tlxs}}
|
||
Bold | bold=yes
|
{{tlb}}
|
||||
Bold teletype
|
bold=yes|tt=yes
|
{{tlxb}}
|
||||
Italic teletype
|
italic=yes|tt=yes
|
{{tlxi}}
|
||||
Code
|
code=yes
|
{{tlc}}
|
{{tlg}}
je najbolj splošna predloga, ki dovoljuje katerokoli kombinacijo zgoraj omenjenih opcij.
- Primerjava sloga
- {{tlf|Milford Haven Line|弘安源氏論議}} ...renders... {{Milford Haven Line|弘安源氏論議}}
- {{tld|Milford Haven Line|弘安源氏論議}} ...renders...
{{Milford Haven Line|弘安源氏論議}}
- {{tlc|Milford Haven Line|弘安源氏論議}} ...renders...
{{Milford Haven Line|弘安源氏論議}}
- Za opis parametrov
- {{para|<var>name</var>|value}} ...vrne...
|name=vrednost
- {{tlx|Milford Haven Line|first parameter{{=}}first value}} ...vrne...
{{Milford Haven Line|prvi parameter=prva vrednost}}