WikiBone talk:Contents

From WikiBone

Jump to: navigation, search

How the Table of Contents works

The Table of Contents takes advantage of the WikiMedia category subsystem, which generates index pages automatically from [[Category]] tags embedded in articles. If care is taken in the use of these tags, all articles in the wiki will be reachable via the Table of Contents.

When you define a new category by referencing it in an article, add a corresponding [[:Category]] entry in the appropriate location in the Table of Contents. If the category is part of a hierarchy, add entries for all the categories in the hierarchy. For example, if you use the tag

[[Category:Foo:Bar:Zoo]]

in an article, the Table of Contents should contain the following entries:

*[[:Category:Foo]]
**[[:Category:Foo:Bar]]
***[[:Category:Foo:Bar:Zoo]]

After adding the entries above, those associated with new categories will appear in the table of contents as red hyperlinks since the index pages for these categories have not yet been created. To create an index page, simply click on one of these links and add some content to the page as described below.

Top-level index pages like Category:Foo don't require any content, but you must add some anyway to force the system to create the page. This can be accomplished by putting the HTML entity for a non-breaking space character on the page:

 

When you create the index page for a subcategory, it should contain category tags for all of its parent categories. For example, the index page for

Category:Foo:Bar:Zoo

should contain the following category tags:

[[Category:Foo]]
[[Category:Foo:Bar]]

These tags will cause the category subsystem to generate a list of subcategories on the index page. Note that for this entire scheme to work, the use of hierarchical categories must be rigidly enforced.

 
--Tjonz 21:20, 3 September 2007 (CDT)

Personal tools