Esta plantilla inserta una tabla de contenido que omite los subtítulos más allá de una determinada profundidad. La tabla obedece a las mismas reglas de diseño que la palabra mágica __TOC__ . Las secciones omitidas aún tienen enlaces de edición de sección en el cuerpo del artículo. El uso principal de esta plantilla son las situaciones en las que desea enlaces de edición de sección para facilitar la edición, pero no desea una tabla de contenido completa. Antes de usar esta plantilla, considere si sería útil para los lectores y otros editores y por qué.
{{TOC limit}}
o{{TOC limit|3}}
La plantilla incluye de manera predeterminada encabezados de segundo y tercer nivel, por ejemplo, los numerados "1" y "1.1" en la tabla de contenidos. (Nota: {{TOC limit|1}}
no hace nada: el encabezado de primer nivel de una página es, de manera predeterminada, el título de la página).
Puede especificar un límite diferente agregando un nivel de encabezado:
{{TOC limit|4}}
4 permite títulos de cuarto nivel, por ejemplo "1.1.1", pero omite cualquier subtítulo debajo de ese de la tabla de contenidos.
La plantilla funciona ocultando los niveles inferiores con CSS. Consulte Plantilla:TOC limit/styles.css .
Los niveles de encabezado en la tabla de contenidos normalmente corresponden a los niveles de encabezado en el wikitexto, por lo que a == Level-2 header ==
normalmente generará los encabezados de la tabla de contenidos de primer nivel ("1"), a === Level-3 header ===
normalmente generará los encabezados de la tabla de contenidos de segundo nivel ("1.1"), y así sucesivamente. Esta correspondencia no se cumple si la página contiene = Level-1 headers =
u omite niveles de encabezado. Por ejemplo, un wikitexto como este:
== Título de nivel 2 (A) ===== Título de nivel 3 (B) ===== Título de nivel 2 (C) ======== Título de nivel 6 (D) ======= Título de nivel 1 (E) === Título de nivel 2 (F) ===== Título de nivel 3 (G) ===
generará una tabla de contenidos como esta:
El uso {{TOC limit}}
de esta página no ocultaría el encabezado D, porque aunque es un encabezado de nivel 6, se muestra en el segundo nivel de la tabla de contenidos. Y ocultaría el encabezado G, aunque es un encabezado de nivel 3, al igual que el encabezado B, porque el encabezado G se muestra en el tercer nivel de la tabla de contenidos, mientras que el encabezado B se muestra en el segundo nivel.
Esta plantilla no interactúa bien con las plantillas {{ TOC right }} , {{ TOC left }} , {{ TOC center }} . Para lograr el efecto correcto, utilice aquellas que tengan un parámetro de límite. Por ejemplo, tiene el mismo efecto que tendrían y si funcionaran juntas.{{TOC right|limit=2}}
{{TOC right}}
{{TOC limit|2}}
Debido a la forma en que se genera la tabla de contenido con MobileFrontend (vista móvil/tableta), esta plantilla actualmente no afecta la forma en que se muestra la tabla de contenido móvil.
Esta plantilla no funciona con el diseño Vector 2022. Consulta el informe de errores en T317818 para obtener más detalles.
Inserta una tabla de contenido que omite los subtítulos más allá de cierta profundidad.
{{ TOC oculto }}