Published Aug 1, 2025
Updated Aug 1, 2025
By Simon

In this article, we will look at the Book module, a Drupal module that enables you to add content entities to books and provides an index component for the book, and a way to navigate from the current chapter to the next chapter and also back to the index, a pagination component, as shown in the image below.

Image
book module pagination show previous, up(a level), and next. previous and next show the page titles with an icon as well.

You can see the top-level index with the pagination in action on the Layout Builder Guide page.

The Book module has been in Drupal core since the beginning of Drupal, but from Drupal 11 it has being removed. If you want to use it, you'll need to install the contributed Book module.

Note: In preparation for a Drupal 10 to 11 upgrade, I installed the contributed Book module which was a painless process, and by doing so the module is no longer listed as deprecated on the Drupal status page. This article is based on the contributed Book module, which has some excellent improvements. 

Installing Book Module

Installing the Book module is the same as any other module; now it is a contributed module. If you are unsure of how to install a module, please check the installing a Drupal module page

Setting up the Book Module

Image
book page content with description from the add content page.

The Book module installs a new Book content type. I have never used the book content type, and we will see that it isn't really needed, so use and modify as you feel inclined or use one of your other content types.

Book Module Settings

The first thing you need to do is visit the settings page. On this page, you can set up which content types can be used in books, the content type for the add child and add sibling page link, and book list sorting for administrative pages. 

Structure > Books
/admin/structure/book/settings

Image
book module setting page

As mentioned, I haven't used the book content type, so I set the article type as the page to use as a child and sibling pages. Depending on how you set up books, you may never use the add child page or add sibling page, but if you do, at least it will use the correct type of page.

Permissions

Also check the permissions page. If you have different user roles set up for content editing and creating, you may need to grant permissions for your users.

Once the basic configuration is done, you can set up your first book. 

Setting Up a Book

The way you set up your books will be a personal preference, so what I share here is only an example of how you can do it.

Add an Index (top-level page)

I like to add an index page to my books; this page is an introduction to what will be found in the book; I keep it short so that the index and the book navigation is easily seen.

This isn't entirely necessary; you can create a book top page from any piece of content, but I have found if the first page's content is long, the index on the first page becomes lost at the bottom.

I also like to provide a page TOC (table of contents) for most long articles, so having the TOC at the top of the page and then the book index at the bottom for the top-level page could add confusion. 

Note that the book index is only shown on the top-level page of a book. If you want the index to show on all page (chapters) of a book, then you need to use the Book Navigation Block that is included. I will share how to set this up later.

Add Other Pages to the Book

Once you have a book set up, you can add more pages to it. You add new pages to your book by either using the outline tab or the book outline sidebar settings. 

Both these ways are effectively the same, as illustrated below. You choose the book, then the parent, and then the weight. By default, new pages are added to the end of the book.

Once you have added a page to a book, either click Add to book outline, or save the page, respectively.

Image
book outline tab showings selection options

A few things to note

I have found when adding new pages to a book, you need to clear the cache for the menus to be rebuilt and show the page in the index; the same is true for when removing a page from an outline.

It might be hard to set the correct weight for your new page when adding it, especially if you want to add the page somewhere in the middle; that is okay though, as you can easily re-arrange the order of the books pages.

Book Order and Hierarchy

You can manage the order and hierarchy of your book(s) on the Books admin page. Use the drag-and-sort feature to easily re-order the pages and create a nested ordering of sections and chapters.

Manage > Structure > Books 
admin/structure/book

  • Visit the Books page
  • Click Edit order and titles operation
  • Reorder your book
  • Click Save book pages
Image
book order and hierarchy UI

Book Navigation and Book Index and Book Links

Book Navigation and Book Index

By default, the book navigation is positioned at the bottom of the page. I feel this is a good place for it, but if you like, you could drag to before the content on the manage display page for the content types; this feature is new with the contributed module, which is a great enhancement.

If you are using multiple content types, be sure to position the book navigation to where you want it to be on each content type's manage display page.

Image
content type manage display showing book navigation

The book navigation also includes the index and the pagination. 

Book Index

The book index is only shown on the top-level page, as already discussed.

The Pagination

The book navigation pagination is on all pages of the book; it shows the previous page's, next page's title, and also provides a way to navigate up one level. 

Image
book module pagination show previous, up(a level), and next. previous and next show the page titles with an icon as well.
Positioning the Book Navigation and Index at the top of the page

Having the ability to put the book index at the top of a content type could work for you; you could set it up for a special book top page content type and then use other content types for the book pages; maybe this is the idea behind the book content type that comes as part of the Book module.

If you were going to do something like this, then you would also need to create a how to create a book guide for your content creators; this is something I am a strong advocate for. In the end, it is totally up to you how you use the available functionality; just be sure it is intuitive to use and provide a user guide.

Book Links

Book links are added to the Drupal links content. The links are: Add child page, Add sibling page, and Printer-friendly version. If you want everyone to view printer-friendly books, you need to grant permission, which can be done on the permissions page. 

Image
book links for admin users when logged in

Book Navigation Block

As well as the core functionality of the Book module, as discussed in the above, you can also use the book navigation block to add the index to a region on the page. You can do this on the block layout page.

The book navigation block can be added to all pages on your site, or you can restrict it to the book that the current page belongs to.

I haven't used it on all pages of a site; I will have multiple separate books for article series and guides. However, if you wanted to, you could make your full site into one large book with multiple levels.

Image
book navigation block settings

I have added the book navigation to a sidebar of this site, and on the desktop, it has sticky position added so that the navigation doesn't scroll off the page.

Image
book navigation block with index page title and link

With the latest version of the Book Module, you can add the book top page as the book navigation heading and also add the top page to the block navigation. These are great new enhancements. Exactly what I needed.

Book Module Add-ons

One last note I will make is that the Block Navigation doesn't show nested menus past the current level; it shows a list arrow marker that suggests that it has children, as illustrated in the following image. 

Image
book navigation block first level pages
Image
book navigation block first and second level pages visible

If you want to have more than one level in your menus and would like them all to show, check out some of the recommended modules on the Book module project page. 

One that looks good is the Book Tree Menu module. From the project: "Book Tree Menu enhances the default Drupal Book navigation by transforming it into a more dynamic, user-friendly menu system." 

I am not using this as my book navigations are only one level, however I have tested it and having the nested pages showing allows for a better user experience and with a little bit of CSS and JavaScript, you could make the sections collapse and expand.
Be sure to check the Book project page on Drupal.org, as there are other recommended modules listed that you may find useful for your use-case. 

Design

Finally, I think it is worth mentioning design. I have shown unstyled examples of the UI elements throughout this article. Even though they look and work fine, you may want to spruce them up a bit and make sure they work well across mobile to desktop. 
One example I will mention is the pagination; with long titles on narrow screens, things start to get tight, so adding some styling to the element and giving them some space will make them easier to use. 
Other elements include the index and the links, all could so with a little styling, so be sure to add them to the design style guide to get some love. 

Conclusion

The book module is a good solution for grouping related articles into books. It is easy to use and allows for manual management of book creation. 

We have looked at the basic setup of the module; from basic settings to using the included Book navigation block. 
I also introduced some add-on contributed modules, such as the Book Tree Menu module that makes the full book tree viewable for nested menus. This is a good enhancement, so people can see the full outline of the book. I might look at using it as having main chapters broken into sections could be good once your books become over 9 or 10 pages; it will be easier on the eye for users scanning the chapters in the book.

Well, that's it for the Book module. I hope you found this useful, and it has introduced a new way to organize the content on your site. Content organization and find-ability is a major aspect of good web and user experience design, and breaking content into books is a good way to create guides and keep related content together and in order.

I write a weekly newsletter, beginner-friendly, that covers topics across the full spectrum of front-end design and development, and using Drupal, a small nugget or two that will make you a better and versatile designer engineer. So to get interesting insights, sign up below! 

Thanks for reading, and be sure to check out the rest of my site.