Predefinição:Link para predefinição com parâmetros/doc

Origem: Wikimotorpedia, a enciclopédia livre.
Revisão em 19h49min de 22 de abril de 2013 por Calimero0000 (discussão | contribs) (Criou nova página com '{{Subpágina de documentação}} <!-- POR FAVOR, ADICIONE CATEGORIAS E INTERWIKIS NO FINAL DESTA PÁGINA --> Esta é a predefinição {{Lp|Lpp}} ou '''Link para predefin...')
(dif) ← Revisão anterior | Revisão atual (dif) | Revisão seguinte → (dif)
Saltar para a navegação Saltar para a pesquisa
Esta é uma subpágina de documentação para a Predefinição:Link para predefinição com parâmetros.
Ela contém informações sobre o seu uso, categorias, bem como todo o conteúdo que não faz parte da predefinição original.

Esta é a predefinição {{Lpp}} ou Link para predefinição com parâmetros.

Uso

Esta página ou secção está a ser traduzida. Ajude e colabore com a tradução.

Pode ser usada em documentação e debates em página de discussão para mostrar como uma predefinição nome poderia ser usada em código.

Here is how this template looks. Code to the left and actual rendering to the right:

Texto pequeno{{tlp|name|parameters}} = {{name|parameters}}

Features of {{tlp|{{{2}}}}}:

  • It shows a template name with a link to that template.
  • It shows up to eight parameters.
  • It also shows empty parameters. (See examples below.)
  • It prevents line wraps in its output.
  • It uses normal text style. (While for instance {{tlx}} uses teletype text style.)

This template belongs to a whole family of similar templates. See the see also section below for some of them. For instance, when writing documentation you might want to avoid a lot of unnecessary links, since it decreases readability. Then on the first occurrence of a template name use {{tl}}, {{tlp|{{{2}}}}} or {{tlx}}, and then use Texto pequeno{{tlf}}, {{tld}} or Texto pequeno{{tlc}}.

Exemplos

CódigoResultadoComentário
Texto pequeno{{tlp}} {{[[:Predefinição:{{{1}}}|{{{1}}}]]|{{{2}}}}} Shows its own syntax.
Texto pequeno{{tlp|name}} {{name|{{{2}}}}}
Texto pequeno{{tlp|name|one}} {{name|one}}
Texto pequeno{{tlp|name|one|two}} {{name|one}}
{{tlp|name|a|b|c|d|e|f|g|h|i|j}} {{name|a}} Shows up to eight parameters. The rest are dropped.
Texto pequeno{{tlp|name|||three|four}} {{name|}} Also shows empty parameters.
Texto pequeno{{tlp|name|||three||}} {{name|}} Even shows empty parameters that come in the end.
Texto pequeno{{tlp|name|one=a|two=b}} {{name|{{{2}}}}} Equal signs is a problem, but there is a fix.
Texto pequeno{{tlp|name|2=one=a|3=two=b}} {{name|one=a}} Use numbered parameters to fix it. Remember to start from 2, since the "name" is number 1.

If you have equal signs in your template parameters then some find it simpler to code it using <nowiki> tags. Here's how to do that. Code to the left and actual rendering to the right:

{{tlp|name|<nowiki>one=a|two=b</nowiki>}} = {{name|one=a|two=b}}

Ver também

  • {{tlc}} – Not linked, several parameters and text in <code></code> style.
  • {{tld}} – Not linked, several parameters and teletype text style.
  • {{tlf}} – Not linked, several parameters and normal text style.
  • {{tl}} – Template link, no parameters and normal text style.
  • {{tlp}} – Template link, several parameters and normal text style.
  • {{tlx}} – Template link, several parameters and interwiki links, teletype text style.
  • {{tn}} – Same as Texto pequeno{{tl}}, but shows the braces as part of the link.