Help:  Contents | Getting Started | New to BRWiki | Editing BRWiki | Editing BRWiki (advanced) | Communication and Community | Additional Help
The help pages are currently being redesigned so they are more helpful. If you have any comments or are interested in helping out, please see the help team.

 This article or section needs to be cleaned up to a higher standard of quality.
style="Template:stub explanationcss;" |
This may include editing to correct spelling and grammar, rewriting sections to ensure they are clear and concise, and wikifying.

A page can be divided into sections, using the section header syntax.

[top]Creation of sections

Sections are created by creating their headers, see Wikipedia:Section#Creation of sections

[top]Table of contents (TOC)

For each page with more than three headings, a table of contents (TOC) is automatically generated from the section headings, unless:
[list][*](for a user) preferences are set to turn it off
[*](for an article) in the edit box the code __NOTOC__ is added
[/redirect]
With __FORCETOC__ or __TOC__ in the wikitext a TOC is added even if the page has less than four headings.
The TOC is put before the first section header, or in the case of __TOC__, at the position of this code. Thus there may be some introductory text before it, known as the "lead". Although usually a header after the TOC is preferable, __TOC__ can be used to avoid being forced to insert a meaningless header just to position the TOC correctly, i.e., not too low.
Preferences can be set to number the sections automatically.
In a page calling a [[template]] with sections, the sections in the template are numbered according to their position in the rendered page, e.g. if the template tag is in the third section, then the first section of the template is numbered four. Any text in the template before its first section shows up as part of the section with the template tag, and any text after the tag before a new header shows up as part of the last section of the template. This may be done deliberately, but can usually better be avoided (see also below).

[top]Compact TOC

Where you have a large number of very short headings (such as letters of the alphabet) you can get a very long table of contents. An alternative is a compact TOC, which you can achieve by inserting the following text:
{{compactTOC}}
which looks like this:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
You can do similar things with years or decades e.g.
1900s - 1910s - 1920s - 1930s - 1940s - 1950s - 1960s - 1970s - 1980s - 1990s - 2000s
Both of the above make use of section linking, see below.

[top]Section linking

The top of each section has in the HTML code a HTML element "a" with both a "name" and an "id" attribute with the section name. This enables linking directly to sections. Section links are used by MediaWiki in a page's automatically generated Table of Contents.
The html code generated at the beginning of this section, for example, is:
class="bbcode_container" |
Code:
[noparse]<p><a name="Section_linking" id="Section_linking"></a></p>
<h2>Section linking</h2>[/noparse]
A link to this section (Section Linking) looks like this:
class="bbcode_container" |
Code:
[noparse][[Help:Section#Section_linking|Section Linking]][/noparse]
From within the same page you can use [[#id|link_label]], and from another page [[page_name#id|link_label]].
An underscore and number are appended to duplicate section names. E.g. for three sections named "Example", the names (for section linking) will be "Example", "Example_2" and "Example_3".
Note that using the date formatting feature in section headers complicates section linking.

[top]Section Linking and Redirects

A link that specifies a section of a redirect page corresponds to a link to that section of the target of the redirect.
A redirect to a section of a page goes to the top of the page. One can use it anyway as a clarification, and at least it works when clicking on the link from the redirect page.
A complication is that, unlike renaming a page, renaming a section does not create some kind of redirect. Also there is no separate what links here feature for sections, pages linking to the section are included in the list of pages linking to the page. Possible workarounds:
[list][*]put an anchor and link to that
[*]put a comment in the wikitext at the start of a section listing pages that link to the section
[*]more drastically, make the section a separate page.
[/redirect]

[top]Section editing

Sections can be separately edited ("section editing feature") by right clicking on the section header and/or special edit links, depending on the preferences set, and by a url like
http://meta.wikimedia.org/w/wiki.phtml?title=Help:Section&action=edit&section=2
This is convenient if the edit does not involve other sections and one needs not have the text of other sections at hand during the edit (or if one needs it, open the section edit link in a new window, or during section editing, open "Cancel" in a window). Section editing alleviates some problems of large pages.
Inserting a section can be done by editing either the section before or after it, merging with the previous section by deleting the header.
"__NOEDITSECTION__" anywhere on the page will remove the edit links. It will not disable section editing itself, right clicking on the section header and the url still work.
Currently there is no link for editing the part before the first heading (Template:bug), except in the classic skin by right clicking on the page header, but the URL works, e.g. for this page:
http://meta.wikimedia.org/w/wiki.phtml?title=Help:Section&action=edit&section=0
It can be obtained less cumbersome by using an edit link and changing the number of the section to zero.
See also Edit summary#Section title as automatic edit summary, Section editing demo.

[top]Editing sections of included templates

The editing facilities can also be applied to a section of an included template. For the purpose of section editing the extent of a section is governed by the headers in the calling page itself. It may consist of a part before the template tag, the template tag, and a part after the template tag, even if the template has sections.
It tends to be confusing if the extent of sections according to the system is different from what the rendered page suggests. To avoid this:
[list][*]if a template has headers, do not put any text before the first header
[*]in the calling page, start a new section after a template that itself has sections
[/redirect]
It may be convenient, where suitable, to start a template with a section header, even if normally the contents of the template would not need a division into sections, and thus the template is only one section. The edit facilities for editing sections can then be used for editing the template from a page that includes it, without specially putting an edit link.
The __NOEDITSECTION__ tag in any template affects both that template, the pages it's included on, and any other templates included on the same page.

[top]Preview

Preview during section editing does not work properly with regard to multiple inclusion of the same template in a page: the limit of five is applied to the section only, not to the whole page.

[top]Opening a link in a header in a new window

When right click editing is enabled, you cannot right click a link in a header to open it in a new window, etc. However most browsers have an alternative way of doing that (Mozilla: middle click, ctrl+left click, type ahead find, TAB navigation; IE: shift+left click).

[top]Horizontal dividing line

A horizontal dividing line as a division demarcation is not taken into account in the section numbering and TOC. Therefore it should not be used for dividing a page in sets of sections.

[top]"See also" line or section

If a page consists of sections and a "see also" refers to the whole page, then make it a separate section. This is to avoid it becoming part of the prior section, to make it visible in the TOC, and to make it easily accessible through the TOC.
Alternatively, a "see also" line is sometimes put at the beginning.
A "see also" belonging to just one section can be put in that section: within a paragraph, as a separate paragraph, or as a subsection.

[top]Text in a large font that should not begin a section

When using text in a large font that should not begin a section, e.g. to show a font, use something like
<b><font style="font-size:120%"> Example text </font></b>
giving
Example text

[top]Blank space as header

If a (sub)section has a blank space as header, it results in a link in the TOC that does not work.

[top]Sections vs. separate pages vs transclusion

Advantages of separate pages:
[list][*]what links here feature
[*]automatic redirect on renaming
[*]redirect to a section is not possible
[*]loading a small page is faster than loading a large page
[*]the same template can not be included more than five times in the same page.
[/redirect]
Advantages of one large page with sections:
[list][*]loading one large page is faster and more convenient than loading several small ones
[*]searching within one large page (the page itself or the wikitext) with a local search function is faster and in some respects better than searching several pages (for which one has to search the whole project); also the TOC provides for convenient navigation.
[/redirect]
Another alternative, (similar to transclusion), is composing a page of other pages using the template feature. This allows easy searching within the combined rendered page, but not in the combined wikitext. Titles have to be provided, and links to the composing pages for easy access. A disadvantage is that the TOC does not show sections of composing pages. Edit section links do not work properly. However, it is possible to have the header outside of the template, and use the ed to be able to edit the template. Contents is built in this way.

[top]See also

[list][*]Wikipedia:Section
[*]Preferences
[/redirect]

Tags for this Page

Similar Pages

  1. Lead section
    By Arjan in forum Main
    Comments: 0
    Last Post: 11-21-2006, 11:50 PM

Bookmarks

Posting Permissions

Posting Permissions
  • You may not create new articles
  • You may not edit articles
  • You may not protect articles
  • You may not post comments
  • You may not post attachments
  • You may not edit your comments
BIRTHRIGHT, DUNGEONS & DRAGONS, D&D, the BIRTHRIGHT logo, and the D&D logo are trademarks owned by Wizards of the Coast, Inc., a subsidiary of Hasbro, Inc., and are used by permission. ©2002-2010 Wizards of the Coast, Inc.