This provides navigation for books.

Mobile Version

Desktop Version

 

Book Content Type Structure

Books are made of Book nodes arranged in a certain order.

If you want to use a description, add a field named "Book Description" in the Book content type. The Title and Body are built into the book content type.  
 

Title <-- built in

Book Description <-- you add this field (optional)

Body <-- built in


Add the field at /admin/structure/types/manage/book/fields:

Book Structure

Here is a sample book structure; your node IDs will be different. Send the user to Page 1 to start their navigation.

Node ID
Level 1
Level 2
Level 3
1
Top of Book
 
 
2
 
Section Heading
 
3
 
 
Page 1
4
 
 
Page 2
5
 
Section Heading
 
6
 
 
Page 3
7
 
 
Page 4

Instructions

  1. While editing a layout on a Book node, click Add Block. The Choose Block pane will appear.
  2. From the Layout Builder section, click Book Navigation (LBK):


     
  3. Provide the title and CSS classes, if desired, and click Add Block.


     
  4. The component appears on the layout:
  5. Be sure to click Save Layout or your changes won't be saved and won't be visible to visitors.
  6. Add the Book Description field to the Book content type (if you want a section description). Note that you can print the Book Description field in the tool tips, if you'd like.
  7. Build your book structure. Add a new book node and set the title to your book name; in our case it's "Computer Languages."

    Once you save the node, the book name will appear in the drop-down when you create new book pages:



     
  8. Add a section node and set its parent to the first node we just made (the top of the book):


     
  9. Add a page to the section. Set the parent to Section you created above:


     
  10. Add additional sections. Continue adding pages being sure to set the section each time you save.


     
  11. Send the user to the first page, not the top of the book. In our case, send them to Page 1-1.