Depth of the navigation is set to 5. For complex books, this is not enough. -> Flexible.

replace
Line 138:
$block['content'] = outline_page_menu_tree($this_node->volume_id,$path[0]->nid, 5, $expand);
with
$block['content'] = outline_page_menu_tree($this_node->volume_id,$path[0]->nid, variable_get('navigation_depth',5), $expand);

in the function outline_admin_settings add the following form field:

$form['navigation_depth'] = array(
'#type' => 'select',
'#title' => t('Depth of the navigation index being displayed in the block'),
'#default_value' => variable_get('navigation_depth',5),
'#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12)),
);

This gives you an other settings in the admin of outline.

CommentFileSizeAuthor
#1 outline.patch2.67 KBrapsli
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rapsli’s picture

FileSize
2.67 KB

I finally got my head around the patching ;)

Summit’s picture

Hi,
Will this patch be committed in Drupal 5 branch?
Thanks in advance for considering this!
greetings,
Martijn

rapsli’s picture

nothing much happened here... so probably not.

beginner’s picture

Title: Flexible depth of navigation » Flexible depth of navigation in block
Version: 5.x-1.0 » 6.x-0.x-dev
Status: Needs review » Needs work

For the patch, use diff -up

New features will only be considered in the HEAD branch.

Which block does this affect?
I'm not too sure what the 5 does in the original code.
Shouldn't we use the depth set for the current page?

beginner’s picture

Category: bug » feature
captaindav’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)