Creating a book
When you enable the Book module, a new Content type will become available, the Book page.
The easist way to create a new book is to first create a Book page than add it to a new book. Lets take the example of the Cookie Wiki recipe site, and suppose we wanted to structure the recipes as a hierarchical book. We might divide the book into meal types (Starters, Main courses, Deserts…), then subdivide each meal type by geographical region (French, Chinese, Indian…).
(In fact, in the case of a recipe site this might not be the best idea, but we will use it as an example.)
Books and Pathauto
If you are using the Pathauto module, which is often a good idea, remember that the new Book page content type can have its own custom pattern for Pathauto (just like any other content type).
Also, the Book module adds some additional Replacement patterns which are specific to books. See the Pathauto help for more information.
It is better to set up Pathauto before you create too many book pages, it is often easier to play around and get it right before you have too much content.
Creating a new Book
Go to Navigation | Create content, and create a new Book page. This will be the top level page of your new book.
The title of this page will also be the title of the book, so choose something suitable (eg “Recipes”), and fill the page with some vague blurb about how this book will change your life and make you thin.
Further down Create Book page page there is a Book outline group. Expand this, and in the Book field select <create a new book>.
When you Save your Book page Drupal will create a book, called “Recipes” in this case.
Adding more pages
There are several methods to add extra pages to your book.
The easiest is to navigate to the parent page and click on Add child page underneath the main page content.
Alternatively you could use Navigation | Create content, and create a new Book page. In the Book outline group, choose where the page is placed. You first choose the book, then you can choose where in the book structure your new page will sit.
Making the book visible
You have created a book, now you need your users to be able to access it.
Go to Navigation | Administrate | Site building | Blocks. There will be a new block, Block navigation, in the disabled section. Place it on your page wherever you wish (left or right sidebars are usually best). You will now get a block showing your book and allowing users to browse the book via a multi-level menu.
From the Navigation | Administrate | Site building | Blocks page you can also choose the configure link next to the Block navigation item. This is a standard Block configuration page which allows you to change the block title and visibility as with any block.
There is an extra item Book navigation block display which is descibed in the next section.
Rearranging the book pages
You can arrange book pages as you go along, using page weights, but this can be tedious.
It can be easier to go to Navigation | Administrate | Content management | Books and choose edit order and titles for your book. This will open up a drag and drop edit page for your book, which works in the same way as drag and drop menu editing.
- Login to post comments
