Table of Contents
|
Horizontal Table of Contents
Want your table of contents to not be a boring little box at the top of your page? Then instead of using [[toc]], try this on for size!
= [#toc0 Horizontal Table of Contents] - [#toc1 'Back to Top' link] - [#toc2 Collapsible segments] - [#toc3 Tables]
Horizontal Table of Contents - 'Back to Top' link - Collapsible segments - Tables
Basically, for every item with a header (which is the lovely +++ you use to make a bold, larger text), you get a TOC anchor assigned. Anchors are what let a browser skip to a certain point on a page. The numbers are assigned in the order the items appear on the page. If you use multiple header levels (++ and +++, for example), it has no effect on the numbers. Numbering starts at 0, not at 1! This page has four segments, which are numbered 0-3.
The equal sign (=) that starts this line of code centers the text. If you choose to break your TOC into two lines, you will need to preface both lines with the equal sign - it does not carry past a carriage return (which occurs every time you hit the enter key). If your TOC wraps (continues from one line to another without using the enter key) it will remain centered without having to use an additional equal sign.
'Back to Top' link
Have you ever wanted to make it easy for players to navigate your page, but not wanted to insert a table of contents (TOC) everywhere? That's what the 'Back to Top' link is for. The following code will insert a link on the right side of the page that links back to the TOC at the top of the page.
[[div style="text-align:right"]]
,,[#toc Back to Top],,
[[/div]]
Make sure you keep the text on a separate line from the [[div]] and [[/div]] code or it will not work.
Text too small? Remove the ,, from both ends to cancel the subscript function - the font will restore to normal size.
Note: The 'Back to Top' link will not work if you use the horizontal TOC or no TOC, since you have not included the [[toc]] code on the page that sets the anchor for this code. If you choose to not use the [[toc]] code, you will need to create an anchor named TOC and place it at the top of your page. The code snippet below should work.
[# toc]
Collapsible segments
Collapsible segments are wonderful, but they can be very confusing. Here's a basic explanation of what each part of the [[collapsible]] code does.
[[collapsible show=">> 1 <<" hide=">> 2 <<" folded="3" hideLocation="4"]]
TEXT
[[/collapsible]]
- Text displayed when the segment is folded (closed).
- Text displayed when the segment is expanded (open).
- 'Yes' defaults the segment as folded and 'No' defaults as expanded when the page is loaded.
- 'both' shows the text from section 2 at the top and bottom of the segment when open. Leaving this section out will default to listing only at the top.
Simple Tables
Tables are useful for many things - family lists, charts, key graphs, etc. They are also very flexible.
||~ Header 1 ||~ Header 2 ||||~ Header 3 - long ||~ Header 4 ||
|| Cell content || Cell content |||| Long cell content || Cell content ||
|| Cell content || Cell content || Cell content || Cell content || Cell content ||
|| Cell content || Cell content || Cell content |||| Long cell content ||
|||||| Really long cell content || Cell content || Cell Content ||
You can span extra segments by using more than one set of pipes (||). For each set used, an additional cell is merged.
It is critical to keep the space between the tilde (~) and the header in the first row of cells, or it won't process the header as a header.
Header 1 | Header 2 | Header 3 - long | Header 4 | |
---|---|---|---|---|
Cell content | Cell content | Long cell content | Cell content | |
Cell content | Cell content | Cell content | Cell content | Cell content |
Cell content | Cell content | Cell content | Long cell content | |
Really long cell content | Cell content | Cell Content |