Abrir menu principal

Mudanças

Wikihelp:Documentação da predefinição

6 169 bytes adicionados, 13h01min de 15 de dezembro de 2019
Criação da Página Wikipédia:Documentação da predefinição.
{{Informativo aprovado|[[Wikipédia:Esplanada/propostas/Oficializar artigos informativos (30mai2012)]]}}
[[Ajuda:Guia Prático/Predefinições|Predefinições]] são uma característica muito poderosa do [[MediaWiki]], mas podem ser confusas para novos usuários e até mesmo usuários experientes podem ter dificuldade em entender as mais complexas. Predefinições devem ser acompanhadas de [[documentação]] para melhor usabilidade.

A documentação da predefinição deve explicar o que ela faz e como utilizá-la. Deveria ser simples o suficiente para que usuários sem conhecimento completo das intrincadas sintaxes de predefinições - incluindo muitos editores experientes que possam estar focados em outras atividades - possam usá-las corretamente. Isto é especialmente verdade no caso de predefinições amplamente utilizadas.
<!--
==What to include==
Template documentation should cover:

* The '''basic purpose''' of the template: what it does and if it is not immediately obvious, why it needs to be done. If there are other templates with similar names or purposes, it's a good idea to mention those, in order to reduce the chance of the wrong one being used.
* The '''[[Help:Templates#Parameters|parameters]]''' of the template: whether they are numbered, named or optional, and if so, what the default values are and what effect they have. If a parameter can take only a limited set of values or is constrained in any way, for example, if it can only use: “yes”, “no” or a number, this should be clearly explained.
* '''Usage examples''': specify the exact wikitext that should be used and the result that it produces. The wikitext can be enclosed in a {{nowrap|<code><nowiki><code>…</code></nowiki></code>}} container, to make it clear and <code>easy to copy, like this</code>. If the template can be used in several different ways, with or without optional parameters, for example, provide a range of examples. A good way to do so is to transclude the template itself into the documentation a few times (i.e., use live examples), with different parameters each time and list the parameters used in each case.
* '''Related templates''': if the template is one of a series of templates, include links to these – in particular, ensure that every template in the series is linked from each of the others, as this makes navigation easier. (A separate navigation template may be useful for this purpose, see: [[Template:Protection templates]]).
* '''[[Wikipedia:Categorization|Categories]]''' and '''[[Wikipedia:InterWikimedia links|InterWikimedia links]]''', where applicable. Like the documentation, these must be within a {{nowrap|<code><nowiki>&lt;noinclude>…&lt;/noinclude></nowiki></code>}} container. Many template categories are available, see: [[:Category:Wikipedia templates]] to browse through them.

Template documentation is often placed in a [[Wikipedia:Subpages|subpage]] of the template itself, which is then [[Wikipedia:Transclusion|transcluded]] at the end of the template page. This separates the often complex template code from the documentation, making the documentation easier to edit. It also allows templates to be [[Wikipedia:Protection policy|protected]] where necessary, while allowing anyone to edit the documentation. This method is sometimes referred to as the “template doc page pattern”.

Documentation of any sort on a template page should always be enclosed by a {{nowrap|<code><nowiki>&lt;noinclude>…&lt;/noinclude></nowiki></code>}} container, so that it does not show up when the template is used on another page. Text on the template page itself adds to the amount of text which must be processed when displaying the template, which is [[Wikipedia:Template limits|limited]] for performance reasons. Placing the documentation in a subpage avoids this (MediaWiki developers have <span class="plainlinks">[http://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&diff=prev&oldid=69888944 recommended]</span> it for this reason).
-->

==Categorias e interwikis==
'''Para colocar a predefinição em uma categoria'''

Adicione a tag <code><nowiki>[[Categoria:nomedacategoria]]</nowiki></code> dentro de uma seção <code><nowiki><includeonly></nowiki></code>...<code><nowiki></includeonly></nowiki></code> na subpágina ''doc''. No caso do uso da documentação por meio do parâmetro ''conteúdo'' {{tlx|Documentação|conteúdo&#61;}}, a tag <code><nowiki><includeonly></nowiki></code> impede a categorização e não deve ser utilizada.

'''Para criar um interwiki para a predefinição'''

Adicione a tag <code><nowiki>[[Códigodelinguagem:nomecompletodapredefinição]]</nowiki></code> dentro de uma seção <code><nowiki><includeonly></nowiki></code>...<code><nowiki></includeonly></nowiki></code> na subpágina ''doc''. No caso do uso da documentação por meio do parâmetro ''conteúdo'' {{tld|Documentação|conteúdo&#61;}}, a tag <code><nowiki><includeonly></nowiki></code> não deve ser utilizada.

'''Para colocar a subpágina ''doc'' em uma categoria'''

Adicione a tag: <code><nowiki>[[Categoria:nomedacategoria]]</nowiki></code> dentro de uma seção <code><nowiki><noinclude></nowiki></code>...<code><nowiki></noinclude></nowiki></code> na subpágina ''doc''.

'''Para fazer com que a predefinição coloque um artigo em uma categoria''' (quando o artigo usa a predefinição)

Adicione a tag <code><nowiki>[[Categoria:nomedacategoria]]</nowiki></code> dentro de uma seção <code><nowiki><includeonly></nowiki></code>...<code><nowiki></includeonly></nowiki></code> na página da ''predefinição''.

== Ver também ==

*[[Wikipedia:Namespace predefinição]] - lista de predefinições organizadas (incompleta)
*[[:Categoria:!Predefinições]] - categorias com todas as predefinições
*[[Ajuda:Guia de edição/Como criar predefinições|Ajuda:Como criar predefinições]] - Ensina como criar uma predefinição.
*[[Predefinição:Documentação]]


{{!Conceitos do MediaWiki}}
<noinclude>
[[Categoria:!Instruções de predefinições| ]]
[[Categoria:!Artigos informativos|Documentação da predefinição]]
[[Categoria:!Recursos da Wikipédia]]

</noinclude>