This project is read-only.

Displaying a Table of Content while browsing a whole Chapter

Orchard Chapters is shipped with a Table of Content Widget which display a hierarchical set of links of the current browsed chapters.

Create the Chapter

First create a chapter and sub-chapters. Note the slug of the main chapter. For instance, if the main chapter is "Documentation", then by default the slug should be "documentation".

Create a Layer

In the "Manage Widgets" menu, click on "Add Layer". Give it a name, for instance "Documentation Pages", and add this specific rule:
url "~/documentation" or url "~/documentation/*"

Technically it states that the widgets on this layer will be displayed when the url is /documentation or any more specific url with this root. This is exactly how all the urls of the "Documentation" chapter will be rendered.

Add a "TableOfContent" widget

Select the newly created layer (it should be bold once selected). In the "Available Widgets" column, click "Add to Zone" in front of "TableOfContent". This will open a form to create a widget.
In the "For Book" field, select the book to display the table of content for.

Choose a zone where you want the table of content to be displayed. Obviously it will be more suited on the right of the page, which is "AsideSecond" in most cases.

Browse the Chapter

Go onto your site and open the chapter you have just configured. You will notice that the current page is highlighted in the table of content.

Last edited Dec 24, 2010 at 10:34 AM by sebastienros, version 3


billyroebuck Oct 19, 2014 at 12:42 AM 
Is this module still active? I'm running 1.8.1. After installing, I don't see any way of creating chapters. Thanks in advance.