Predloga:Mlx/dok
To je dokumentacijska podstran za glavno stran Predloga:Mlx. Namenjena je shranjevanju navodil, kategorizaciji in drugi vsebini, ki ni del glavne strani. |
Uporablja Lua: |
Predloga:Mlx (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
urediCode | Result | Notes |
---|---|---|
{{mlx|Example}}
|
{{#invoke:Example|function}}
|
Usage without function name. This does not produce a usable invocation. |
{{mlx|Example|hello}}
|
{{#invoke:Example|hello}}
|
Usage with a function name. |
{{mlx|Example|count_fruits|4=bananas=5|5=apples=10}}
|
{{#invoke:Example|count_fruits|bananas=5|apples=10}}
|
Usage with a function name and parameters. |
{{mlx|Example|count_fruits|bananas{{=}}5|apples{{=}}10}}
|
{{#invoke:Example|count_fruits|bananas=5|apples=10}}
|
Usage with a function name and parameters, using {{=}}. |
TemplateData
urediTemplateData za Mlx
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- {{ml}} - Similar function but not surrounded in
<code>...</code>
tags. - {{tlx}} - 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}}