Flexible depth of navigation in block

rapsli - February 6, 2008 - 20:34
Project:Outline
Version:6.x-0.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

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

rapsli - February 28, 2008 - 12:14

I finally got my head around the patching ;)

AttachmentSize
outline.patch 2.67 KB

#2

Summit - September 10, 2008 - 12:52

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

#3

rapsli - September 10, 2008 - 18:49

nothing much happened here... so probably not.

#4

beginner - September 11, 2008 - 06:54
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?

#5

beginner - April 7, 2009 - 08:31
Category:bug report» feature request
 
 

Drupal is a registered trademark of Dries Buytaert.