PluginMaketocbox
{MAKETOCBOX(float=>right)}{MAKETOCBOX}
This is an opening paragraph that appears before the first headline.
! Headline One (h1)
This is the text under Headline One. This is the text under Headline One. This is the text under Headline One.
! Headline Two (h1)
This is the text under Headline Two. This is the text under Headline Two. This is the text under Headline Two. This is the text under Headline Two.
!! Headline Three (h2)
This is the text under Headline Three. This is the text under Headline Three. This is the text under Headline Three.
entered on the wiki edit page produces:
{MAKETOCBOX(float=>right)}{MAKETOCBOX}
{BR()}{BR}
{BR()}{BR}
{BR()}{BR}
{BR()}{BR}
{BR()}{BR}
{BR()}{BR}
{BR()}{BR}
This is an opening paragraph that appears before the first headline.
Headline One (h1)
This is the text under Headline One. This is the text under Headline One. This is the text under Headline One.
Headline Two (h1)
This is the text under Headline Two. This is the text under Headline Two. This is the text under Headline Two. This is the text under Headline Two.
Headline Three (h2)
This is the text under Headline Three. This is the text under Headline Three. This is the text under Headline Three.
Headline Four (h3)
This is the text under Headline Four.
On some pages, the float aspect of the MAKETOCBOX results in layout that isn't especially nice, as it can overlap other page elements. In such cases, one remedy is to put several blank lines under the box. There is wiki syntax for a blank line, or a BR plugin can be used — like {BR()}{BR} — which inserts an HTML <br /> tag.
The plugin code itself inserts a string in the wiki page like this:
<div class=\"maketocbox\" style=\"$fl\"><div><span id=\"maketocbox-title\">Contents</span> <a href=\"javascript:icntoggle('maketocbox-contents');\" />[[-/+]</a></div><div id=\"maketocbox-contents\">{maketoc}</div></div>";So the plugin allows the float to be set in each instance of MAKETOCBOX and relies on CSS for other style details. The Tikipedia stylesheet has these selectors and properties (check tikipedia.css itself for any changes):
/* For MAKETOCBOX plugin */
div.maketocbox {
display: block;
border: 1px solid #AAAAAA;
background: #F9F9F9;
padding: 4px;
margin: 5px;
text-align: center;
font-size: 95%;
}
span#maketocbox-title {
font-weight: bold;
}
div#maketocbox-contents {
display: block;
text-align: left;
margin-left: 0px;
}
div#maketocbox-contents li {
margin-left: 0;
}
div#maketocbox-contents li li {
margin-left: -8px;
}
div#maketocbox-contents ul.toc,
div#maketocbox-contents ul.toc li ul {
list-style: none;
}
div#maketocbox-contents ul.toc li a:link,
div#maketocbox-contents ul.toc li ul li a:link {
background-image: none;
}Other theme stylesheets can/should be edited to add styles for this plugin if it is used with themes other than Tikipedia.