Book

By Phil Frilling, 31 May, 2012
Today's project required me to fine tune Drupal's standard book module. Basically, I needed to limit the choices in the 'Book Outline' area to only display books that the user was the author of. Unfortunately, Drupal's default permissions don't allow for this. Either the user can administer all outlines or none, nothing in between.

Form Alter to the Rescue

So I created a custom module with a hook_form_alter() function and started inspecting the $form variable. The book outline form options are keyed with the node id, which I can use to check the author.