Editing the Table of Contents: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Gerald Chi (talk | contribs) mNo edit summary |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
{{CMG}} | |||
==Overview== | |||
Sometimes you will want to remove the Table of Contents on a page. Type this text | Sometimes you will want to remove the Table of Contents on a page. Type this text | ||
Line 34: | Line 38: | ||
| Allows for trailing whitespace to be included in the page save. | | Allows for trailing whitespace to be included in the page save. | ||
|}<br clear="left" /> | |}<br clear="left" /> | ||
[ | ==Behavior switches== | ||
A behavior switch controls the layout or behavior of the page and can often be used to specify desired omissions and inclusions in the content. | |||
{| class="wikitable" | |||
|- | |||
! {{Hl2}}| Word | |||
! {{Hl2}}| Description | |||
! {{Hl2}}| Versions | |||
|- | |||
! {{Hl3}} colspan="3"| '''[[Table of contents]]''' | |||
|- | |||
| <code><nowiki>__NOTOC__</nowiki></code> | |||
| Hides the [[table of contents]] (TOC). | |||
| | |||
|- | |||
| <code><nowiki>__FORCETOC__</nowiki></code> | |||
| Forces the table of contents to appear at its normal position (above the first header). | |||
| | |||
|- | |||
| <code><nowiki>__TOC__</nowiki></code> | |||
| Places a table of contents at the word's current position (overriding <code><nowiki>__NOTOC__</nowiki></code>). If this is used multiple times, the table of contents will appear at the first word's position. | |||
| | |||
|- | |||
! {{Hl3}} colspan="3"| '''Editing''' | |||
|- | |||
| <code><nowiki>__NOEDITSECTION__</nowiki></code> | |||
| Hides the section edit links beside headings. This is especially useful, where a heading is created from within a template: the normal wiki section-edit would in this case edit the template code, which is normally counterintuitive to the user. If a template contains multiple headings, it may be necessary to add "<code><nowiki>__NOEDITSECTION__</nowiki></code>" after each heading. | |||
| | |||
|- | |||
| <code><nowiki>__NEWSECTIONLINK__</nowiki></code> | |||
| Adds a link ([[MediaWiki:Addsection|"+" by default]]) beside the "edit" tab for adding a new section on a non-talk page (see {{mediawiki|m:Help:Section#Adding a section at the end|Adding a section to the end}}). | |||
| 1.7+ | |||
|- | |||
| <code><nowiki>__NONEWSECTIONLINK__</nowiki></code> | |||
| Removes the link beside the "edit" tab on pages in talk namespaces. | |||
| {{mediawiki|rev:47522|1.15+}} | |||
|- | |||
! {{Hl3}} colspan="3"| '''Categories''' | |||
|- | |||
| <code><nowiki>__NOGALLERY__</nowiki></code> | |||
| Used on a category page, replaces thumbnails in the category view with normal links. | |||
| 1.7+ | |||
|- | |||
| <code><nowiki>__HIDDENCAT__</nowiki></code> | |||
| Used on a category page, hides the category from the lists of categories in its members and parent categories (there is an option in the [[Help:Preferences|user preferences]] to show them).<!-- hiddencategory hiddencat hide category categories --> | |||
| 1.13+ | |||
|- | |||
! {{Hl3}} colspan="3"| '''Language conversion''' | |||
|- | |||
| <code><nowiki>__NOCONTENTCONVERT__</nowiki></code> <br /> <code><nowiki>__NOCC__</nowiki></code> | |||
| On wikis with language variants, don't perform any content language conversion (character and phase) in article display; for example, only show Chinese (zh) instead of variants like zh_cn, zh_tw, zh_sg, or zh_hk. | |||
| | |||
|- | |||
| <code><nowiki>__NOTITLECONVERT__</nowiki></code> <br /> <code><nowiki>__NOTC__</nowiki></code> | |||
| On wikis with language variants, don't perform language conversion on the title (all other content is converted). | |||
| | |||
|- | |||
! {{Hl3}} colspan="3"| '''Other''' | |||
|- | |||
| <code><nowiki>__START__</nowiki></code> | |||
| No effect. | |||
| | |||
|- | |||
| <code><nowiki>__END__</nowiki></code> | |||
| Explicitly marks the end of the article, to prevent MediaWiki from removing trailing whitespace. Removed in {{mediawiki|rev:19213|19213}}. | |||
| 1.1–1.8 | |||
|- | |||
| <code><nowiki>__INDEX__</nowiki></code> | |||
| Tell search engines to index the page (overrides {{mediawiki|Manual:$wgArticleRobotPolicies|$wgArticleRobotPolicies}}, but not robots.txt). | |||
| 1.14+ | |||
|- | |||
| <code><nowiki>__NOINDEX__</nowiki></code> | |||
| Tell search engines not to index the page (ie, do not list in search engines' results). | |||
| {{mediawiki|rev:37973|1.14+}} | |||
|- | |||
| <code><nowiki>__STATICREDIRECT__</nowiki></code> | |||
| On redirect pages, don't allow MediaWiki to automatically update the link when someone moves a page and checks "Update any redirects that point to the original title". | |||
| {{mediawiki|rev:37928|1.13+}} | |||
|} | |||
{{WikiDoc Help Menu}} | {{WikiDoc Help Menu}} | ||
{{WikiDoc Sources}} | {{WikiDoc Sources}} | ||
[[Category:Help]] | [[Category:Help]] | ||
Latest revision as of 14:40, 2 September 2013
Editor-In-Chief: C. Michael Gibson, M.S., M.D. [1]
Overview
Sometimes you will want to remove the Table of Contents on a page. Type this text
__NOTOC__
to accomplish this.
More Table of Contents (TOC) commands are found in the table below:
Table of contents
Word | Explanation |
---|---|
__NOTOC__ | Hides the Table of Contents on the current page. |
__FORCETOC__ | Forces the table of contents to appear. |
__TOC__ | Places a Table of Contents here. Also forces it to appear. |
More magic
Word | Explanation |
---|---|
__NOEDITSECTION__ | Hides the edit links beside headings. |
__NOTITLECONVERT__ __NOTC__ |
Like __NOCC__ but affecting article title only. |
__END__ | Allows for trailing whitespace to be included in the page save. |
Behavior switches
A behavior switch controls the layout or behavior of the page and can often be used to specify desired omissions and inclusions in the content.
Template:Hl2| Word | Template:Hl2| Description | Template:Hl2| Versions |
---|---|---|
Template:Hl3 colspan="3"| Table of contents | ||
__NOTOC__
|
Hides the table of contents (TOC). | |
__FORCETOC__
|
Forces the table of contents to appear at its normal position (above the first header). | |
__TOC__
|
Places a table of contents at the word's current position (overriding __NOTOC__ ). If this is used multiple times, the table of contents will appear at the first word's position.
|
|
Template:Hl3 colspan="3"| Editing | ||
__NOEDITSECTION__
|
Hides the section edit links beside headings. This is especially useful, where a heading is created from within a template: the normal wiki section-edit would in this case edit the template code, which is normally counterintuitive to the user. If a template contains multiple headings, it may be necessary to add "__NOEDITSECTION__ " after each heading.
|
|
__NEWSECTIONLINK__
|
Adds a link ("+" by default) beside the "edit" tab for adding a new section on a non-talk page (see Template:Mediawiki). | 1.7+ |
__NONEWSECTIONLINK__
|
Removes the link beside the "edit" tab on pages in talk namespaces. | Template:Mediawiki |
Template:Hl3 colspan="3"| Categories | ||
__NOGALLERY__
|
Used on a category page, replaces thumbnails in the category view with normal links. | 1.7+ |
__HIDDENCAT__
|
Used on a category page, hides the category from the lists of categories in its members and parent categories (there is an option in the user preferences to show them). | 1.13+ |
Template:Hl3 colspan="3"| Language conversion | ||
__NOCONTENTCONVERT__ __NOCC__
|
On wikis with language variants, don't perform any content language conversion (character and phase) in article display; for example, only show Chinese (zh) instead of variants like zh_cn, zh_tw, zh_sg, or zh_hk. | |
__NOTITLECONVERT__ __NOTC__
|
On wikis with language variants, don't perform language conversion on the title (all other content is converted). | |
Template:Hl3 colspan="3"| Other | ||
__START__
|
No effect. | |
__END__
|
Explicitly marks the end of the article, to prevent MediaWiki from removing trailing whitespace. Removed in Template:Mediawiki. | 1.1–1.8 |
__INDEX__
|
Tell search engines to index the page (overrides Template:Mediawiki, but not robots.txt). | 1.14+ |
__NOINDEX__
|
Tell search engines not to index the page (ie, do not list in search engines' results). | Template:Mediawiki |
__STATICREDIRECT__
|
On redirect pages, don't allow MediaWiki to automatically update the link when someone moves a page and checks "Update any redirects that point to the original title". | Template:Mediawiki |