Plantilla:Collapse

De Wikipedia, la enciclopedia libre
Saltar a: navegación, búsqueda
Extended content
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
Icono de documentación de plantilla Documentación de la plantilla[ver] [editar] [historial] [purgar]
La plantilla Plantilla:Colapse se utiliza para colocar cuadros de colapsar en discusiones breves y fragmentos de discusiones. Para doblar largos cadenas de discusión, use
...en un montón de texto ... |}.

Esta plantilla solo debe usarse de acuerdo con la guía de Wikipedia;reestructuración nunca debe usarse para finalizar una discusión sobre las objeciones de otros editores, excepto en casos de edición disruptiva inequívoca.

No escondas contenido en artículos. Esto infringe el WP:Manual de Estilo # Desplazamiento de listas y contenido contraíble y WP:pautas de accesibilidad.

Usos

{{Collapse|1=Discussion text to be put into box.|2=Optional custom heading}}

Definitivamente es más seguro usar los parámetros nombrados y , porque de lo contrario cualquier carácter "=" deshace la plantilla.

El paramatro bg

Ek parametrobg es opcional. It changes the background color. Use Web color values (e.g. #F0F2F5).

Ejemplo

{{Collapse|1=Discussion text to be put into box.|bg=#F0F2F5}} creates:

Extended content

Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
Extended content
Discussion text to be put into box.

The padding parameter

The padding parameter adjusts the amount of cell padding (defaults to 8px):

{{Collapse|1=Discussion text to be put into box.|padding=20px}} creates the following (expand the box to see the border padding effect):

Extended content
Discussion text to be put into box.

The float parameter

The float parameter allows the collapsed content to float to the left, right, or center of the page (defaults to none with width = 100%):

{{Collapse|1=Discussion text to be put into box.|float=center}} creates the following:

Extended content
Discussion text to be put into box.

{{Collapse|1=Discussion text to be put into box.|float=center|width=30em}} creates the following:

Extended content
Discussion text to be put into box.

{{Collapse|1=Discussion text to be put into box.|float=left|width=30em}} creates the following:

Extended content
Discussion text to be put into box.

{{Collapse|1=Discussion text to be put into box.|float=right|width=30em}} creates the following:

Extended content
Discussion text to be put into box.

{{Collapse|1=Discussion text to be put into box.|float=none|width=30em}} creates the following:

Extended content
Discussion text to be put into box.

Around header text

When used with a section of text, include the section header in the collapsed portion of text. For example, given:

== Heading ==
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Replace with:

Plantilla:Tlsp

The expand parameter

Simply add to have the box show up in expanded form with a "hide" link, instead of collapsed form with a "show" link. Other options: yes, y, expand, expanded, uncollapse, uncollapsed. Note: will fold the box (default).

The clear parameter

In some situations you may not want the default clear: both; CSS to apply, which puts the collapse box below any left- or right-floated content within the same HTML block. In this case, you can use , , or , as needed.

When content includes tables

This template frequently breaks when used around content that consists of or includes wikitables. Such content can be made collapsible by using the {{collapse top}} and {{collapse bottom}} templates instead of {{collapse}}.

If you want to collapse only the table and not other content, you can do this using wikitable parameters. See the Collapsing tables guide for help.

TemplateData

Esta es la documentación de la plantilla, generada mediante TemplateData, que es utilizada también para su inserción y modificación en el editor visual.

TemplateData para Collapse

Creates a collapsible box that allows its content to be hidden or revealed on user's command. It is used to reduce clutter.

Parámetros de la plantilla

Parámetro Descripción Tipo Estado
Contents 1

Contents of the box

Predeterminado
vacío
Ejemplo
vacío
Valor automático
vacío
Contenido obligatorio
Title 2titleheadingheader

Text of title bar. Defaults to "Extended contents".

Predeterminado
Extended content
Ejemplo
vacío
Valor automático
vacío
Cadena sugerido
Expanded by default? expand

Setting to "yes, y, expand, uncollapse") will cause the box to show its contents by default. Any other value (and omitting this parameter) causes the box to be collapsed by default (its contents hidden).

Predeterminado
yes
Ejemplo
vacío
Valor automático
vacío
Cadena opcional
Border width border

Width of the outermost border. Accepts a number (e.g. 2) followed immediately with a CSS-compatible unit of measurement. (e.g. "px") Example: 2px.

Predeterminado
1px
Ejemplo
vacío
Valor automático
vacío
Cadena opcional
Title bar's color bgbackground

Color of the title bar. Can be set any valid CSS color value but please take care that text would remain black.

Predeterminado
#CFC
Ejemplo
vacío
Valor automático
vacío
Cadena opcional
Padding padding

Width of the padding, the empty space between border and the contents. Accepts a number (e.g. 2) followed immediately with a CSS-compatible unit of measurement. (e.g. "px") Example: 2px.

Predeterminado
8px
Ejemplo
vacío
Valor automático
vacío
Desconocido opcional
Outer background bg1

Color of the space between the inner and outer border. Can be set to any valid CSS color.

Predeterminado
transparent
Ejemplo
vacío
Valor automático
vacío
Cadena opcional
Outer border color b-color

Color of the outer border. Can be any valid CSS color.

Predeterminado
silver
Ejemplo
vacío
Valor automático
vacío
Cadena opcional
Collapse box width. width

The width of the entire collapsed box.

Predeterminado
100%
Ejemplo
vacío
Valor automático
vacío
Cadena opcional
Center-align title center

If set to any value, the title will be centered.

Predeterminado
vacío
Ejemplo
vacío
Valor automático
vacío
Cadena opcional
Font color fc

Font color for the title. Also sets the color of the [show]/[hide] link. Can be any valid CSS color

Predeterminado
vacío
Ejemplo
vacío
Valor automático
vacío
Cadena opcional

Re-using at other wikis

This template depends upon having rules for the three classes (collapsible, uncollapsed, and collapsed) in the appropriate CSS files, and some related JavaScript installed. This template transcludes {{main other}} and {{lorem ipsum}}, which should also be imported at the same time.

For MediaWiki versions ≥ 1.18, this template can simply be exported and then imported into another MediaWiki installation. Changes to the source code that will need to be made are:

  • class="collapsible needs to be changed to class="mw-collapsible (probably because the class had apparently been deprecated since MediaWiki v1.20).
  • |#default=collapsed}} changed to |#default=mw-collapsed}}.
  • Some additional changes to the source code will need to be made in order for this template to become usable on the Main/Article (ns:0) namespace.
Esta documentación está transcluida desde Plantilla:Collapse/doc.
Los editores pueden experimentar en la zona de pruebas (crear) y en los casos de prueba (crear) de la plantilla.
Por favor, añade las categorías en la subpágina de documentación. Subpáginas de esta plantilla.