Manual:Creando páginas con texto precargado

From mediawiki.org
This page is a translated version of the page Manual:Creating pages with preloaded text and the translation is 53% complete.

Precargar wikitexto presenta al usuario una página creada parcialmente, posiblemente con instrucciones en línea para la organización del contenido, en lugar de una página en blanco. Esta técnica es especialmente útil cuando el wiki contiene una o más categorías de artículos, con mucho texto proforma o la información que debe recopilarse para dichos artículos es una combinación de datos estructurados y texto de forma libre.

Creando páginas con texto precargado es un proceso de 3 pasos

  1. Diseñe el archivo de precarga y sus plantillas de apoyo
  2. Crear páginas para los archivos precargados y las plantillas de soporte
  3. Configure el activador para cargar el archivo de precarga

Diseñando el archivo de precarga

El archivo de precarga suele ser un artículo con una plantilla incrustada. Por ejemplo, si desea un artículo para cada cliente o contacto de marketing, es posible que desee precargar un texto similar al del siguiente ejemplo.

   <!-- Ingrese la información de contacto de su cliente después del signo igual.
        Si necesita ayuda para cargar las imágenes de la tarjeta de presentación, consulte [[Help:Uploading business card images]]
   -->
   {{CustomerContact
   |Number=
   |BizcardImage=
   |Primary phone number=
   |Address=
   }}

Nombrando y documentando el archivo de precarga

Algunas extensiones tienen expectativas específicas en cuanto a dónde se debe almacenar el texto precargado. Otros dejan esa decisión totalmente en manos del administrador del sistema.

Nombrar y documentar el archivo precargado requiere cierto cuidado, porque los archivos precargados no siempre aparecen en "Qué enlaces aquí" y, por lo tanto, corren el riesgo de eliminarse accidentalmente (sin información/sin enlaces; es difícil saberlo de un artículo que se creó y abandonado). Para archivos precargados basados en plantillas, las siguientes convenciones de nomenclatura pueden ayudar a evitar la eliminación accidental:

  • place template in Template:CategoryName
  • place preload file in Template:CategoryName/Preload

Cargando el archivo de precarga

Preloading can be done with a preload parameter in a URL like http://en.wikipedia.org/wiki/Talk:Main_Page?action=edit&section=new&preload=Template:Foo which links to the edit box of a new page, preloaded with Template:Foo. There are also a number of extensions available to trigger your preload file, see below.

The wikitext of the source page is preloaded into the editbox if the page or section does not exist yet. If the page or section to be edited already exists then only its wikitext is loaded, the preload command is ignored.

  • ‎<noinclude> and ‎</noinclude> tags are removed; if you need the preloaded text to provide noinclude tags, you can use
    <no<includeonly></includeonly>include>
    
    in your source: since the two middle tags will be stripped (see next), the preloaded text will end up with just the desired ‎<noinclude>.
  • The ‎<includeonly> and ‎</includeonly> tags are stripped from the source page. If you need the preloaded text to provide includeonly tags, you can use
    <include<includeonly></includeonly>only>
    
    in your source: since the two middle tags will be stripped, the preloaded text will end up with just the desired ‎<includeonly>.

Thus there is neither a complete inclusion nor a regular transclusion. See also task T7210 (since 2006-03-09).

If it is creating a new section, the initial content of the "Subject/headline" box can be provided with the parameter "preloadtitle"

http://meta.wikimedia.org/w/wiki.phtml?title=Meta:Sandbox&action=edit&section=new&preloadtitle=New_Header

If it is not creating a new section, the summary can be set with the summary parameter (task T19002).

http://meta.wikimedia.org/w/wiki.phtml?title=Meta:Sandbox&action=edit&summary=Doing%20some%20changes

The minor edit checkbox can be set by adding minor parameter

http://meta.wikimedia.org/w/wiki.phtml?title=Meta:Sandbox&action=edit&minor=1

Usando parámetros

Versión de MediaWiki:
1.23

You can also specify parameters to the preload text with the preloadparams[] url parameter (When linking on wiki, you may want to escape the [] to be %5b%5d.) Each parameter specified replaces a $1, $2, ... variable.

Note: $1, $2, ... variables are distinct from {{{1}}}, {{{2}}}, ... variables. In order to use preloadparams[], it appears to be necessary for the template to use $1, $2, ... variables instead of {{{1}}}, {{{2}}}, ... variables. This documentation should be improved by explaining why these two distinct template parameter notations exist, and when it is possible or necessary to use each of the two notations.

For example:

Extensiones

Extensions that trigger a preload file include:

A few extensions also handle all three steps for you:

All extensions related to page creation are in Categoría:Extensiones de creación de páginas .


Véase también