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.
Comment | File | Size | Author |
---|---|---|---|
#1 | outline.patch | 2.67 KB | rapsli |
Comments
Comment #1
rapsli CreditAttribution: rapsli commentedI finally got my head around the patching ;)
Comment #2
Summit CreditAttribution: Summit commentedHi,
Will this patch be committed in Drupal 5 branch?
Thanks in advance for considering this!
greetings,
Martijn
Comment #3
rapsli CreditAttribution: rapsli commentednothing much happened here... so probably not.
Comment #4
beginner CreditAttribution: beginner commentedFor 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?
Comment #5
beginner CreditAttribution: beginner commentedComment #6
captaindav CreditAttribution: captaindav commented