Template:Hide inline TOC/doc

This template displays the TOC on the left-hand sidebar on the Vector 2022 skin, while hiding it in other skins. This is useful when a TOC is useful for navigating the page with the sidebar, but is too large to be displayed inline in the legacy skin. It only contains the following:

<div style="display:none">__FORCETOC__</div>

Reason

The Vector 2022 skin has the TOC on the sidebar, thus the TOC is not inserted inside articles (inline). However, some TOC templates automatically hide the TOC, and other pages manually hide it by using the _NOTOC_ magic word. This makes browsing lists much harder. Many of these pages are alphabetical lists, where having a TOC is useful for navigation.

Non–Vector 2022 TOCs are inside .mw-parser-output, so one could just have TemplateStyles with #toc { display: none; } and it would hide the TOC for all non–Vector 2022 skins. However, many custom TOC templates like {{Compact TOC}} automatically add id="toc", so it is not so simple.

There is a relevant discussion at Wikipedia talk:Manual of Style/Glossaries § Compact ToC hostile to Vector2022 users and phab:T317818 § 8778839.

Usage

Place {{Hide inline TOC}}, or its redirect, {{Hit}}, anywhere on the page, preferably at the top.

See also

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.