Plantilla:Mlx/ús: diferència entre les revisions

Contingut suprimit Contingut afegit
Pàgina nova, amb el contingut: «{{Subpàgina d'ús}} == Descripció == {{lt|mlx}} s'utilitza per mostrar un nom de mòdul com un enllaç envoltat de claus amb la funció d'analitzador {{((}}#invoke{{))}}, mostrant així el nom del mòdul com a codi en lloc de realment invocar-lo. El seu ús principal es troba en instruccions i documentació on s'utilitza per referir-se a un mòdul per nom sense invocar-lo. També s'hi pot definir una funció i uns paràmetres. == Exempl...».
 
(Cap diferència)

Revisió de 07:18, 19 set 2021

Descripció modifica

(lituà) s'utilitza per mostrar un nom de mòdul com un enllaç envoltat de claus amb la funció d'analitzador {{#invoke}}, mostrant així el nom del mòdul com a codi en lloc de realment invocar-lo. El seu ús principal es troba en instruccions i documentació on s'utilitza per referir-se a un mòdul per nom sense invocar-lo. També s'hi pot definir una funció i uns paràmetres.

Exemples modifica

Codi Resultat Notes
{{mlx|Exemple}} {{#invoke:Exemple|function}} Usage without function name. This does not produce a usable invocation.
{{mlx|Exemple|hello}} {{#invoke:Exemple|hello}} Usage with a function name.
{{mlx|Exemple|count_fruits|4=bananas=5|5=apples=10}} {{#invoke:Exemple|count_fruits|bananas=5|apples=10}} Usage with a function name and parameters.
{{mlx|Exemple|count_fruits|bananas{{=}}5|apples{{=}}10}} {{#invoke:Exemple|count_fruits|bananas=5|apples=10}} Usage with a function name and parameters, using {{=}}.

TemplateData modifica

Aquesta és la documentació dels paràmetres de la plantilla utilitzada pel nou editor visual.

Mlx

Aquesta plantilla mostra un nom d'un mòdul com un enllaç envoltat de claus amb la funció d'analitzador {{#invoke}}, mostrant així com s'utilitzaria el nom del mòdul al codi. El seu ús principal es troba en instruccions i documentació.

Paràmetres de la plantilla

ParàmetreDescripcióTipusEstat
module name1

the module name without the namespace prefix “Module:”, which is added automatically

Cadenaobligatori
function name2

the function name within the module to call

Cadenaobligatori
parameter 13

the name (and value) of the first parameter, use {{=}} to add an equal sign

Cadenaopcional
parameter 24

the name (and value) of the second parameter, use {{=}} to add an equal sign

Cadenaopcional
parameter 35

the name (and value) of the third parameter, use {{=}} to add an equal sign

Cadenaopcional

Vegeu també modifica

  • {{ml}} - Similar function but not surrounded in <code>...</code> tags.
  • {{tlx}} - A version of this template for templates instead of modules.

Format de propòsit general modifica

  • 1 {{tlg}} is the most general, allowing any combination of text style and/or link style options.
  • 2 Prevents wrapping of text by placing it inside <span class="nowrap">...</span> tags.
  • 3 Uses monospace font but not <code>...</code>.
  • 4 Allows links to templates in any namespace.

Altres plantilles de format modifica

Exemple de codi Efecte Notes
{{tl2|Hatnote|lang=fr}} {{hatnote}} Supports linking to sister projects (e.g., fr:Hatnote)
{{tlu|User:Ahunt/SSHFS}} Plantilla:Tlu Supports linking to any namespace
{{xpd|Hatnote|Some hatnote text}} "{{hatnote|Some hatnote text}}" gives "" [1] 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

Amb enllaços d'utilitat modifica

Exemple de codi Efecte
{{lts|Hatnote}} Plantilla:Hatnote (modifica discussió què hi enllaça historial)
{{t links|Hatnote}} Plantilla:T links
{{tfd links|Hatnote}} Plantilla:Tfd links
{{tiw|Hatnote}} Plantilla:hatnote (què hi enllaça, edita)
{{tltt|Hatnote}} Plantilla:Tltt
{{tetl|Hatnote}} Plantilla:Tetl
{{tsetl|Hatnote}} Plantilla:Tsetl
{{ti|Hatnote}} Plantilla:Ti
{{tic|Hatnote}} Plantilla:Tic
{{tiw|Hatnote}} Plantilla:Hatnote (què hi enllaça, edita)
{{tlt|Hatnote}} Plantilla:Tlt
{{ttl|Hatnote}} Plantilla:Ttl
{{twlh|Hatnote}} Plantilla:Twlh