Template:Chapter navigation with TOC/doc

About
Template:Chapter navigation with TOC (or its redirect Template:Chapnavtoc) is a fork of Template:Chapter navigation; it was forked to avoid any legacy issues arising from changing its code.

It uses CSS and JavaScript to position chapter navigations at both the top and bottom of a page.

The template adds:


 * Top of page: navigation for the previous, book name, next pages of the book.
 * Bottom of page: navigation for previous page, book name, and next page of the book.
 * It also provides an option to add a mini TOC (Table of Contents) at the bottom of the page.
 * It adds by default a book category, and sorts category pages by chapter name.

Basic usage
Add this once at the bottom of a page:



You can instead use its redirect, which is simpler:



Note that the "previous subpage name" and "next subpage name" fields are both optional.

For first and last chapter of a book, leave the first or second field blank respectively:


 * for the first chapter
 * for the last chapter

TOC usage
It also provides an option to add a mini TOC (Table of Contents) at the bottom of the page, by using a third field:


 * 1) Create a subpage for a mini TOC, e.g. Book name/TOC mini
 * 2) Link the subpage in the third field

For the book "Example book", you would add TOC mini at "Example book/TOC mini". With three chapters "Example book/Chapter 1", "Example book/Chapter 2", "Example book/Chapter 3", you would place the following once at the bottom of the page of each corresponding chapter:

(on Chapter 1 only)

(on Chapter 2 only)

(on Chapter 3 only)

TOC mini coding
The recommended coding for TOC mini is:

 Chapter 1Chapter 2Chapter 3Chapter 4Chapter 5

Where  etc. are replaced with the correct data. The above example would produce:

Chapter 1Chapter 2Chapter 3Chapter 4Chapter 5

It is normally created at Book name/TOC mini. See Template:Nowrap begin for no-wrap documentation.

Advanced tips

 * By default it adds a book category. To disable this add the nocat=yes switch, for example:




 * Be aware that if you are using a TOC mini, any category from there will be transcluded, unless it is wrapped with noinclude tags.


 * If transcluded into Book name/Print version, the template should not be displayed nor printed. But otherwise you can prevent transclusion by wrapping with noinclude tags, for example:




 * If looking at Wikibooks with "Mobile view" (there is a link at the bottom of every Wikibooks page), the top navigation will not appear, as this is not possible in mobile view. The top navigation should also not appear on the main page.

Example

 * See Brief History of Europe