Manual:Espacio de nombres

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Namespace and the translation is 51% complete.

Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎català • ‎dansk • ‎español • ‎français • ‎italiano • ‎lietuvių • ‎polski • ‎português • ‎português do Brasil • ‎čeština • ‎русский • ‎ქართული • ‎中文 • ‎日本語 • ‎한국어

Un "espacio de nombres" es una colección de páginas que tienen contenido con propósito o uso similar. Los espacios de nombres pueden pensarse como particiones de diferente tipo de información en la misma wiki, manteniendo el contenido separado de acuerdo a perfiles de usuarios, páginas de ayuda, etc.

Resumen técnico

Las páginas existen dentro de un espacio de nombres. Y se pueden distinguir por su prefijo, que forma parte del título de una página, separado por dos puntos (:).

Por ejemplo:

Título Espacio de nombres
Foo Main
Project:Foo Project
Help:Foo Help

El "espacio de nombres principal" no tiene prefijo. Además, las páginas en este espacio de nombres no pueden comenzar con nombres de prefijos de espacios de nombres existentes seguidos de dos puntos.

Pages can be moved between namespaces simply by changing the prefix part of their title.

Namespace prefixes can be translated, and aliases can be configured for each (see $wgNamespaceAliasesManual:$wgNamespaceAliases). All namespaces also have a "canonical" prefix, which works on all wikis regardless of configuration. Aliases and canonical names can be used in links, when performing a search, and in the page title with the help of the {{DISPLAYTITLE}} magic word.

Each namespace has a corresponding namespace index. Within the database, the title is split into namespace index and text title, and this is used for storage in the page.page_namespace and page.page_title columns, among others.

Subject and talk namespaces

See Help:Talk pages for instructions on how to use talk pages.

Most namespaces have an associated discussion namespace (or "talk" namespace). All discussion namespaces have odd-integer indices, and the discussion namespace index for a specific namespace with index n is n+1. The namespaces with even-integer indices are subject namespaces (note that this is a distinct concept from content namespaces). The subject-talk duality can be explored using the {{SUBJECTPAGENAME}} and {{TALKPAGENAME}} magic words. The <body> tag of pages in talk namespaces has the "ns-talk" CSS class, which might be useful for styling.

Espacios de nombres incorporados

Mediawiki inicialmente contiene 18 namespaces.

  • 16 corresponden a páginas reales numeradas de 0-15 y agrupadas en pares de sujeto/discusión, .
  • 2 virtuales numeradas

The full list is presented in the table below.

Índice Nombre Propósito Talk
0 (Main) "Real" content; articles.[1] Talk 1
2 User User pages.[2] User talk 3
4 Project Información sobre el wiki.[3] Project talk 5
6 File Páginas de descripción de multimedia File talk 7
8 MediaWiki Personalización de la interfaz del sitio[4] MediaWiki talk 9
10 Template Páginas de plantillas Template talk 11
12 Help Páginas de ayuda Help talk 13
14 Category Páginas de descripción de categorías Category talk 15
-1 Special Holds special pages N/A
-2 Media Alias for direct links to media files

Each namespace also has a constant derived from its name, with all letters in uppercase, spaces replaced by underscores, and prefixed by "NS_". For example, the constant for the "User talk" namespace is NS_USER_TALK. A complete list can be found in Manual:Namespace constants.


  1. The subject namespace has no prefix.
  2. La edición de la página de discusión de un usuario genera una notificación al mismo.
  3. Defined by $wgMetaNamespaceManual:$wgMetaNamespace, which unless manually set otherwise, defaults to $wgSitenameManual:$wgSitename.
  4. Only editable by users with the 'editinterface' permission.

Espacios de nombres personalizados

Extensions and site administrators can define additional namespaces to group additional classes of pages together. For a thorough overview, see Using custom namespaces.

Funcionalidad

Some namespaces, like Project and Help, only exist for convenience and do not have any extra functionality compared to the Main namespace.

Template namespace pages can be transcluded without namespace prefix.

User namespace pages are associated with user accounts or IP addresses. Changes to user talk pages generate an automatic message notification.

Pages in the "MediaWiki" namespace are used to override default messages in language file and can only be edited by administrators or other users with the editinterface permission.

File and Category pages have special functionality, as described in Help:Managing files/esHelp:Managing files and Help:CategoríasHelp:Categories. Category pages can be moved by users with the "move-categorypages" right. Image moving can be enabled with $wgAllowImageMovingManual:$wgAllowImageMoving in MediaWiki 1.13 and above.

All pages in discussion namespaces have a "post a comment" feature (see Help:Section#Adding a section at the end on Meta).

Véase también