This page is a translated version of the page Help:ChangeContentModel and the translation is 29% complete.
PD Nota: Ao editar esta página, você concorda em publicar a sua contribuição no âmbito da licença CC0. Veja as páginas de ajuda do domínio público para mais informações. PD
Special:ChangeContentModel while using the MonoBook skin.

Se não houver subpágina, o valor do código Special:ChangeContentModel será retornado. A content model, very broadly, is the format or type of a given page on a wiki. By default a page's content model is wikitext, a rich text format that makes use of wiki markup. Content models used on Wikimedia projects include css and javascript for storing code, wikibase-item for entries on Wikidata, and Campaign on Wikimedia Commons for upload campaigns such as Wiki Loves Monuments. The default content models are "CSS" and "JavaScript" for user namespace pages whose titles end with .css and .js respectively, and with Extension:TemplateStyles installed, it is "Sanitized CSS" in the template name space. A list of content models is available at content handlers. More technical information is available at Manual:ContentHandler .

Todas as ações são registradas em Special:Log/contentmodel, com um conveniente link "reverter" para desfazer alterações, se necessário. Users must have the editcontentmodel permission to be able to change content models. On Wikimedia projects this permission is granted via user groups: to sysops, interface editors and - on some projects - template editors.


Tradicionalmente, os únicos tipos de páginas que poderiam ser criadas na MediaWiki eram páginas de wikitexto: documentos de texto rico escritos em marcação wikitexto. Isso é aceitável para entradas de enciclopédia na Wikipédia, mas é insuficiente para conteúdos de outros tipos, como blocos de códifo fonte, conteúdo de data estruturada, ou fluxo de trabalhos complexos.

With the advent of the Wikidata project (and the Wikibase extension) in 2012, the ContentHandler branch was developed to allow the creation of pages other than wikitext documents. As of MediaWiki 1.21, ContentHandler is a part of the core MediaWiki software.

Some generic content models include those meant for storing and presenting source code, but they can also be used to create customized editing interfaces. For example, instead of using a horrible mess of templates to structure content on a page, you could store the underlying data in a structured format such as JSON and then write a MediaWiki extension that builds a custom editing interface on top of this structured data. This approach is used by MassMessage to create delivery list pages and by CollaborationKit for creating WikiProjects. Although these extensions have their own workflows for creating pages, Special:ChangeContentModel can also be used.

As an alternative to setting content models on a page-by-page basis, you can specify alternative defaults for a given namespace. For example, the default content model in the Module namespace is ScribuntoContent. Similarly, you can enforce that a given content model is only used in a given namespace; ScribuntoContent can only be used in the Module namespace.

Visualizando o modelo de conteúdo atual de uma página

Para ver o modelo de conteúdo da página atual, clique “Informações da página” na caixa de ferramentas na barra lateral. Você também pode acrescentar ?action=info na URL para obter a mesma página.

Mudando o modelo de conteúdo de uma página

Vá para Special:ChangeContentModel, insira o nome da página que você deseja mudar. É possível ser uma página inexistente se você deseja criar uma nova página que usa um modelo de conteúdo diferente do padrão. Então, escolha o modelo de conteúdo para o qual deseja mudar. Clique “Mudar” para fazer a mudança.

Note that not all conversions are possible. If you are trying to convert a page that already exists and the MediaWiki software cannot figure out how to re-interpret the current page's content, the content model will not be converted and you will get an error message. When this happens, it is recommended that you archive the old page and create the page anew in the new content model. For instance, you could rename "Project:Foo" to "Project:Foo/old" and then use Special:ChangeContentModel to create a new page at "Project:Foo". If possible, you should include a link to "Project:Foo/old" on the new page.

Desfazendo uma mudança

All content model changes are logged at Special:Log/contentmodel on your wiki. To undo a change, go to the relevant entry in the log and click "reverter". You will see a pre-filled form; click "Mudar" to carry out the revert. If you are viewing the page history and the most recent change was the one that changed the content model, you can use the undo feature to change the content model back. Rollback will also undo any content model changes.

Note that this may not always work, particularly if the page was edited after the content model was changed in such a way to make it incompatible with the old content model. When this happens, you will have to undo the edits that made it incompatible. Alternatively, you could carry out the content model change anew and archive the old content. Ideally, content model changes are few and far between. In most situations, a page will not have to change content model more than once.

See also