The depth of the book navigation block could be configurable thru a block configuration setting.
I will try to implement that asap.

Comments

mansion’s picture

Status: Active » Closed (fixed)

I developed my own block so don't need this feature anymore.
Closing it.

erok210’s picture

Version: x.y.z » 6.3
Category: feature » support
Status: Closed (fixed) » Active

I'm a newbie to Drupal. I've been trying to learn how set the depth for the book.module. I can't seem to find a way to set this under the "configuration" settings area.

Right now the book navigation block expands as I go deeper into the book pages. I'd like to stop at the chapter level.

- Book
--Chapter title level <- stop here.
---Page title level

I assume I have to modify the php code in the book.module file, but I need specific details on what to modify. I tried changing "book['depth'] < MENU_MAX_DEPTH)" to "book['depth'] = 2) , but I didn't see any change in behavior:

LINE 55:
if ((user_access('add content to books') || user_access('administer book outlines')) && node_access('create', $child_type) && $node->status == 1 && $node->book['depth'] < MENU_MAX_DEPTH) {

erok210’s picture

Status: Active » Closed (fixed)

Found a PHP snippet that helped.

pyxio’s picture

Hello,

I am trying to do the same thing. Can you please share the php snippet you used to solve this? thanks. Kevin

hazah’s picture

Title: Book block depth » Book block maximum depth configuration
Version: 6.3 » 7.x-dev
Status: Closed (fixed) » Active

Can anyone recommend how to approach this in Drupal 7? While the book module is invaluable for organizing content, it would make sense to have a more fine tuned control for something of this nature. I do think that a feature such as this should cover more than one case per site. That is, different books should be able to have their own configuration for this. Anyone has further thoughts on this topic?