The book page was created for use on Drupal.org to facilitate the collaborative creation and editing of documentation. In order to give everyone the chance to contribute to the Drupal handbooks (http://drupal.org/handbooks), it was necessary to let all site users make new book pages and edit existing pages. The danger, of course, is that not everyone writes good documentation, and some people might even do malicious things like delete or deface the existing documentation, so some level of moderation was needed. The solution was that any new book pages and any revisions of existing book pages would be subject to approval by a moderator. When an existing book page gets edited, the changes are saved as a revision, and the original version of the page continues to be displayed on the site.
The book page content type differs from other content types in a number of subtle yet important ways. In addition to the Title and Body fields, which are common to other types such as blogs, pages, and stories, the page for creating book type content has the following fields:
• The Parent field controls the page's position within the overall hierarchy. A book is defined as a content node that lives at the top level of the book hierarchy (has no parent) and all of its children. This is achieved by choosing <top-level> as the value for the Parent field.
• The Weight field controls the order of pages within a particular level of the hierarchy. As usual, content with lighter weights (smaller numbers) will appear before content with heavier weights (larger numbers).
• The Log Message field is intended to be used as part of a collaborative editing workflow that makes book pages unique among content types. Someone making an edit can use this field to indicate to the moderators or other editors what was changed and why.
The Book module introduces three permissions: Create Book Pages, Edit Own Book Pages, and Maintain Books. The Create Book Pages and Edit Own Book Pages permissions are self-explanatory and deal with only the book page content type. Users with the Maintain Books permission can edit book pages that are not their own, and they can put posts of any content type (and from any author) into the book outline hierarchy.
Was this article helpful?