Jump to content

Template:TOC top: Difference between revisions

From cernipedia
m optional title
m 34 revisions imported from wikipedia:Template:TOC_top
 
(31 intermediate revisions by 17 users not shown)
Line 1: Line 1:
<includeonly>__NOTOC__<table class="toc plainlinks" id="toc" {{#if:{{{align|}}}|align="{{{align}}}"}}>
<templatestyles src="TOC top/styles.css"/>{{#ifeq:{{{primary|}}}|false||__NOTOC__}}<div class="toc plainlinks toc-top {{#switch:{{lc:{{{align|}}}}} |left=toc-top-left |right=toc-top-right |center=toc-top-center}}" role="navigation" aria-labelledby="toc-title-text-template" {{#ifeq:{{{primary|}}}|false||id="toc"}} {{#if:{{{clear|}}}|style="clear: {{{clear}}}"}}>
<tr>
<div class="{{#ifeq:{{{primary|}}}|false|toc-top-false-title|toctitle}}">{{#ifeq:{{{primary|}}}|false|<span role="heading" id="toc-title-text-template">{{{title|{{MediaWiki:Toc}} }}}</span>|<h2 id="toc-title-text">{{{title|{{MediaWiki:Toc}} }}}</h2>}}</div>
<td>
{{flat list}}<noinclude>
<div id="toctitle">
{{TOC bottom}}
<h2>{{#if:{{{title|}}}|{{{title}}}|{{MediaWiki:Toc}}}}</h2>
{{documentation}}</noinclude>
</div>
<div><div class="hlist" style="margin: auto"></includeonly><noinclude>{{doc|content=
 
This is used to create custom table of contents templates such as {{tl|list TOC}}.
 
Please note that this is '''solely for ease of maintaining existing templates'''. Please '''do not use this to write new templates''': instead, browse through [[:category:Wikipedia table of contents templates]] and use an existing template. This code is one of the final pieces in cleaning up years of redundant and overlapping code in this area.
 
== See also ==
 
* {{tl|TOC bottom}}
 
[[category:Wikipedia table of contents templates]]
}}</noinclude>

Latest revision as of 13:22, 19 November 2026