Template:ReportTOC: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<div class=" | <onlyinclude><div class="rtoc-box"> | ||
<div class="rtoc-header">Contents</div> | |||
<div class=" | <div class="s-fm"> | ||
<div class="rtoc-section-title">Front Matter</div> | |||
{{#if:{{{fm1title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{fm1title}}}</span><a class="rtoc-read" href="{{{fm1url}}}">Read</a></div>}} | |||
{{#if:{{{fm2title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{fm2title}}}</span><a class="rtoc-read" href="{{{fm2url}}}">Read</a></div>}} | |||
{{#if:{{{fm3title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{fm3title}}}</span><a class="rtoc-read" href="{{{fm3url}}}">Read</a></div>}} | |||
{{#if:{{{fm4title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{fm4title}}}</span><a class="rtoc-read" href="{{{fm4url}}}">Read</a></div>}} | |||
</div> | |||
<div class=" | <div class="s-spm"> | ||
<span class=" | <div class="rtoc-section-title">SPM</div> | ||
<span class=" | {{#if:{{{spm1title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{spm1title}}}</span><a class="rtoc-read" href="{{{spm1url}}}">Read</a></div>}} | ||
{{#if:{{{spm2title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{spm2title}}}</span><a class="rtoc-read" href="{{{spm2url}}}">Read</a></div>}} | |||
{{#if:{{{spm3title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{spm3title}}}</span><a class="rtoc-read" href="{{{spm3url}}}">Read</a></div>}} | |||
</div> | </div> | ||
<div class=" | <div class="s-ts"> | ||
<span class=" | <div class="rtoc-section-title">TS</div> | ||
<span class=" | {{#if:{{{ts1title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ts1title}}}</span><a class="rtoc-read" href="{{{ts1url}}}">Read</a></div>}} | ||
{{#if:{{{ts2title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ts2title}}}</span><a class="rtoc-read" href="{{{ts2url}}}">Read</a></div>}} | |||
{{#if:{{{ts3title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ts3title}}}</span><a class="rtoc-read" href="{{{ts3url}}}">Read</a></div>}} | |||
</div> | </div> | ||
<div class=" | <div class="s-ch"> | ||
<span class=" | <div class="rtoc-section-title">Chapters</div> | ||
<span class=" | {{#if:{{{ch1title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ch1title}}}</span><a class="rtoc-read" href="{{{ch1url}}}">Read</a></div>}} | ||
{{#if:{{{ch2title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ch2title}}}</span><a class="rtoc-read" href="{{{ch2url}}}">Read</a></div>}} | |||
{{#if:{{{ch3title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ch3title}}}</span><a class="rtoc-read" href="{{{ch3url}}}">Read</a></div>}} | |||
{{#if:{{{ch4title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ch4title}}}</span><a class="rtoc-read" href="{{{ch4url}}}">Read</a></div>}} | |||
{{#if:{{{ch5title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ch5title}}}</span><a class="rtoc-read" href="{{{ch5url}}}">Read</a></div>}} | |||
{{#if:{{{ch6title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ch6title}}}</span><a class="rtoc-read" href="{{{ch6url}}}">Read</a></div>}} | |||
{{#if:{{{ch7title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ch7title}}}</span><a class="rtoc-read" href="{{{ch7url}}}">Read</a></div>}} | |||
{{#if:{{{ch8title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ch8title}}}</span><a class="rtoc-read" href="{{{ch8url}}}">Read</a></div>}} | |||
{{#if:{{{ch9title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ch9title}}}</span><a class="rtoc-read" href="{{{ch9url}}}">Read</a></div>}} | |||
{{#if:{{{ch10title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{ch10title}}}</span><a class="rtoc-read" href="{{{ch10url}}}">Read</a></div>}} | |||
</div> | </div> | ||
<div class=" | <div class="s-an"> | ||
<span class=" | <div class="rtoc-section-title">Annexes</div> | ||
<span class=" | {{#if:{{{an1title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{an1title}}}</span><a class="rtoc-read" href="{{{an1url}}}">Read</a></div>}} | ||
{{#if:{{{an2title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{an2title}}}</span><a class="rtoc-read" href="{{{an2url}}}">Read</a></div>}} | |||
{{#if:{{{an3title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{an3title}}}</span><a class="rtoc-read" href="{{{an3url}}}">Read</a></div>}} | |||
{{#if:{{{an4title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{an4title}}}</span><a class="rtoc-read" href="{{{an4url}}}">Read</a></div>}} | |||
{{#if:{{{an5title|}}}|<div class="rtoc-entry"><span class="rtoc-entry-title">{{{an5title}}}</span><a class="rtoc-read" href="{{{an5url}}}">Read</a></div>}} | |||
</div> | </div> | ||
<div | </div></onlyinclude> | ||
< | <noinclude> | ||
== Usage == | |||
<pre> | |||
{{ReportTOC | |||
| fm1title = Foreword | |||
| fm1url = https://wiki.example.org/Foreword | |||
| fm2title = Preface | |||
| fm2url = https://wiki.example.org/Preface | |||
| spm1title = Summary for Policymakers | |||
| spm1url = https://wiki.example.org/SPM | |||
| ts1title = Technical Summary | |||
| ts1url = https://wiki.example.org/TS | |||
| ch1title = Chapter 1: Framing and Context | |||
| ch1url = https://wiki.example.org/Chapter_1 | |||
| ch2title = Chapter 2: Observed Changes | |||
| ch2url = https://wiki.example.org/Chapter_2 | |||
| an1title = Annex I: Glossary | |||
| an1url = https://wiki.example.org/Annex_I | |||
}} | |||
</ | </pre> | ||
All parameters are optional except where a section is used — if a section has no entries it will still render its header. Chapters supports up to 10 entries; all other sections support up to 4–5. Increment the number suffix to add more entries within each section. | |||
</ | [[Category:Templates]] | ||
</noinclude> | |||
Revision as of 04:56, 10 April 2026
Contents
Front Matter
SPM
TS
Chapters
Annexes
Usage
{{ReportTOC
| fm1title = Foreword
| fm1url = https://wiki.example.org/Foreword
| fm2title = Preface
| fm2url = https://wiki.example.org/Preface
| spm1title = Summary for Policymakers
| spm1url = https://wiki.example.org/SPM
| ts1title = Technical Summary
| ts1url = https://wiki.example.org/TS
| ch1title = Chapter 1: Framing and Context
| ch1url = https://wiki.example.org/Chapter_1
| ch2title = Chapter 2: Observed Changes
| ch2url = https://wiki.example.org/Chapter_2
| an1title = Annex I: Glossary
| an1url = https://wiki.example.org/Annex_I
}}
All parameters are optional except where a section is used — if a section has no entries it will still render its header. Chapters supports up to 10 entries; all other sections support up to 4–5. Increment the number suffix to add more entries within each section.