The Drupal Book module for creating guides, FAQ, or manuals on your site
Welcome to the world of creating really useful and valuable content! All online user guides, handbooks, manuals, tutorials, FAQ pages, and so on, have one thing in common — they need a good hierarchical structure.
Luckily, there is a super popular module in Drupal that is responsible for this. Let’s now see what’s hidden inside the “pages” of the Drupal Book module and how it can help you create hierarchical content.
The importance of user guides and manuals on a website
Content in the form of various guides helps readers find expert answers to their questions and understand how a product/service/website works. Some sites need guide pages more than others due to the product complexity. However, even a simple guide, when properly structured, can be useful in many ways. Here are some of the benefits that guides could give you:
- A good explanation often leads directly to the purchase and inspires customers to hit the “Order” button. In any case, it stimulates the users’ interest.
- Your audience appreciates your willingness to help them, and becomes more loyal to your brand. If you share some really useful information, you get a reputation of an expert in your niche.
- Consider also the SEO aspect — longer sessions and valuable content are the things that will help you rank higher among your competitors in SERP. In addition, useful explanations and answers are perfect for Google’s rich snippets and voice search results.
- Finally, in many cases, a good guide on a website saves a lot of your staff’s work that would otherwise be necessary for answering customers’ questions.
The Drupal Book module: solution for guides of all kinds
The words “Drupal book” may evoke associations with great Drupal development books written by famous Drupal developers (e.g. “Drupal 8 Development Cookbook” by Matt Glaman, “Drupal 8 Blueprints” by Alex Burrows, “Pro Drupal development” by John K. VanDyk, and others). However, the hero of our story is the Drupal core Book module that is written according to the best Drupal development practices as well.
The core Drupal Book module allows you to unite related pieces of content in a hierarchical collection. This may include handbooks, step-by-step guides, tutorials, manuals, FAQ, and much more. You can create them either with the special “Book page” content type provided by the module or with existing pages of other content types. This Drupal module also has an option for presenting this content in a printer-friendly version that could be very convenient for your audience.
The most famous Drupal website, drupal.org, known as the most reputable source of information about Drupal, uses the Book module in its documentation section.
This module is part of the Drupal core, although it is not enabled by default. This is true for the Drupal 9 and Drupal 8 Book module, as well as the Drupal 7 Book module.
How to create content with the Drupal Book module
Let’s take a tour of what the module is capable of. We will use the Drupal 8 Book module in our example.
1. Enabling the Drupal Book module
It all begins with enabling the module on the Extend tab of your Drupal 8 admin dashboard.
2. Configuring the “Book page” content type
As we mentioned above, you can build books from the special content type or from existing ones. This special content type is one of the first new things you will see after enabling the Book module. It’s called the “Book page” content type, and you can find it under “Structure — Content types.”
Just like all Drupal content types, the Book page is fieldable. This means you can shape its structure with fields (image, body, links to references, video, and so on). If you leave it as is, it will just have a title and a body.
Of course, it’s also possible to use the “Manage form display” and “Manage display” tabs where you can rearrange the order of the fields and configure each field to your liking (set image styles, hide or show field labels, etc.).
3. Creating the book content
To create a new book, go to “Content — Add content — Book page” and fill out the content fields based on the structure you have created in Step 2. While creating the Drupal book page, it’s important to go to the “Book Outline” to the right and select “Create a new book.”
When you hit “Save,” you will see your newly created book page. This is a top-level book page. You can use the “Add child page” link to add child pages to it.
While adding child pages, you need to choose:
- the book they belong to
- their “Parent item” below which they should display in the hierarchy
- their “Weight” according to which the items of the same level are displayed in a specific order (one with the lowest weight comes first)
You can change all this anytime by clicking on the “Outline” tab found on every book node next to the traditional “Edit,” “Delete,” and so on.
4. Drupal Book navigation
The module provides links on the book pages for better navigation. On the parent book page, there is a list of links to the child pages.
Each child page has more specific navigation — the links to the previous and next items, as well as the “Up” link that takes you one level up.
If the item is the only one on its level, the previous and next items will be the ones that are higher and lower in the hierarchy.
Even more navigation options will unfold if you enable the Book navigation block in “Structure — Block layout,” which will bring up a menu that shows where a user is in your book structure.
5. The Book management page
The module also provides the “Books” page under “Structure” on your Drupal admin dashboard. Here is where you can manage all your books. You are presented with two tabs:
- List (to see all the books you have created). By clicking “Edit order and titles,” you can change the title text and rearrange the pages by drag-and-dropping, as well as jump to viewing, editing, or deleting particular items.
- Settings (to configure which content type can be used in the book outlines and in child pages). By default, the Book Page content type is selected, so there is no need to change anything.
However, if you want other content types to be there, just select them and save the configuration. NB: Users with the permission to administer book outlines will be able to create books from any content type even if they are not checked on this list.
6. Creating books from ready content nodes
As soon as you have allowed other content items to be used in book pages on the “Structure — Books — Settings” page (see 5.2), you can create books from them.
On each Drupal node’s page of the given type, you will now see the “Outline” tab. It works exactly in the same way as with the Book page. You can either “Create a new book” from your existing node or add the node as a child item with a specific weight to some other book page.
Let us help you build user guides on your Drupal website!
Hopefully, you enjoyed our overview of the Drupal 8 Book module. It is a very powerful and multi-purpose module for all kinds of structured content. However, it is not the only module in this niche — there are others to fulfil your specific goals. Our Drupal development team is ready to help you configure the Drupal Book module or choose other modules for presenting your content in the best way. Waiting to hear from you!