Flexible depth of navigation in block
| Project: | Outline |
| Version: | 6.x-0.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
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.

#1
I finally got my head around the patching ;)
#2
Hi,
Will this patch be committed in Drupal 5 branch?
Thanks in advance for considering this!
greetings,
Martijn
#3
nothing much happened here... so probably not.
#4
For the patch, use
diff -upNew 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?
#5