Book: structured document publishing

Last modified: June 27, 2009 - 15:54

A book is a set of pages tied together in a hierarchical sequence, perhaps with chapters, sections, subsections, and so on. You can use books for manuals, site resource guides, Frequently Asked Questions (FAQs), or whatever you'd like.

Users who have permission can create a book and write, review, modify, or rearrange the pages. Many users can work together on a book -- you can allow or disallow collaboration, to whatever extent you want.

Creating, modifying, and administering books

On the books administration page (administer >> content >> books), users with proper permission can view a list of all published books on your site. For each book there's a link to an outline, from which you can edit or delete pages or sections, change their titles, or change their weight (thus putting them in a different order). In some versions of Drupal, you can also check for orphan pages (pages that have become disconnected from the rest of the book); in other versions of Drupal, pages cannot be orphaned.

When a user creates new content of type Book page, they can add their page at the level of their choice in a book, or start a new book if they have permission. This is called defining the "parent" for a book page, and is in the "Book outline" section of the edit screen.

You also can change the position of a page in the book hierarchy later from the page edit screen, by changing the "parent" to which it belongs. Any "child" pages of the page you are editing will automatically be moved too, so if the page you are editing is a section header, this allows you to move an entire section.

On the access control or permissions page (administer >> access control or administer >> user management >> permissions, depending on your version of Drupal) you can assign users with various roles the permission to create book pages, to create new books, and to edit their own book pages or the pages of others.

You can also give permission to outline posts in books or add content to books (depending on the version of Drupal you are using). Users with this permission can take any other type of content on your site and add it to a book. When viewing content they'll see an outline tab, and by clicking it they'll come to an interface that lets them move the content into a book.

Book navigation and menus

When a visitor to your site is viewing a book page, they will automatically see links at the bottom for navigating to the previous page and the next, and a link labeled up that leads to the level above in the structure. There will also be a link to a printer-friendly version of the page at the bottom, for users with permission to view printer-friendly versions of pages.

The Book module automatically generates a contents page for each book. However, if the books on your site are complex, you may find that you need additional navigational aids beyond the table of contents and the previous/next/up links for users to understand where they are in your book. One navigational aid you can use is the book navigation block, which you can enable on the blocks page (administer >> site building >> blocks). Enabling this block will turn on a menu that shows where the user is in your book; the menu is only visible when viewing the book.

Another navigational aid you can add to your site is a books link in any of your menus, which will take users to a list of your books. The books menu item is automatically part of the Navigation menu, and you can enable it from menus page (administer >> site building >> menus). You can also add this link to any menu you want (click "add menu item," and enter "book" in the "path" field.)

Note that the "books" link takes users to your books. The "book navigation" block helps users move around inside your books.

Quick reference

Here are the common operations with books. You can:

  • create a new book, by creating a new book page and defining it to be a top-level page in the "parent" field
  • create new book pages: create content >> book page.
  • administer individual books (choose a published book from list): administer >> content >> books.
  • set workflow and other global book settings at administer >> content >> content types >> book page.
  • enable the book navigation block: administer >> site building >> blocks.
  • control who can create, edit, and maintain book pages at administer >> access control or administer >> user management >> permissions.
 
 

Drupal is a registered trademark of Dries Buytaert.