[drupal-devel] [feature] Include top-level parent on book navigation block

bomarmonk drupal-devel at drupal.org
Wed Apr 20 20:33:37 UTC 2005


Issue status update for http://drupal.org/node/20831

 Project:      Drupal
 Version:      cvs
 Component:    book.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  clydefrog
 Updated by:   bomarmonk
 Status:       patch

Should this patch work in conjunction with the other patch here:
http://drupal.org/node/1412 [1]? 


This other patch allows book blocks to appear on all pages as menus for
a site (not just menus for when you are already inside the book). 


Also, another thought on your patch: why not make the title of the book
itself be the link to the root page in the book navigation block? This
would make the menu block more efficient and it would seem to be a
logically sound modification-- no matter how these blocks are used.


Thanks again for your contribution to the book module-- I believe it
will prove quite valuable to those who want to use books to organize
and create menus for a hierarchal website.
[1] http://drupal.org/node/14120




bomarmonk



Previous comments:
------------------------------------------------------------------------

April 19, 2005 - 05:51 : clydefrog

This is a patch to include the top-level book page in the book
navigation block. I think this makes the navigation block a lot more
useful. Before this patch, all pages in the book were included in the
block except for the root level page, so it was difficult to get back
to the root level.


I don't know if this is the best way to do it, but it works and affects
only book_tree() and book_block().




------------------------------------------------------------------------

April 19, 2005 - 05:53 : clydefrog

Attachment: http://drupal.org/files/issues/book.module_0.patch (1.38 KB)

Sorry... Here's the patch.




------------------------------------------------------------------------

April 19, 2005 - 16:54 : puregin

clydefrog, your patch breaks the default behaviour of book.module,
which is to allow multiple independent books.


In other words, there is - by design - no unique 'top-level book page'.


You probably want to create a book page to be a parent for all of your
existing pages; this will let you navigate via the book module block as
you desire.




------------------------------------------------------------------------

April 19, 2005 - 17:18 : bomarmonk

Can't you still have multiple, independent books and still show the root
page in the navigation block for these independent books?  Why not have
this flexibility?   I only know that if you are using the book
navigation for departmental information (for example) and you make the
first page of the department "board" (for example) the initial index
and information page will not display unless I use this patch.  Why
would I want it to behave otherwise?  What would I use this root page
to display?  Where? Perhaps I am not understanding why I would want
this root page to be invisible in my navigation block, since it would
be a starting point for all other pages in that book?   But then again,
I'm looking at the book module for possibly creating a hierarchal
structure for my entire website, and the navigation blocks for books as
a way to create structured navigation to this content.  Since taxonomy
does a poor job of presenting the browser with structured, static
content, this may be my only other option....  I'll keep trying to
understand all of the uses for these modules, but in the end I need
them to work for me and my purposes... of course Drupal is supposed to
have flexibility in this regard, but I'm finding that navigation and
menus for hierarchal, static conent isn't one of Drupal's strong
points.  Maybe a seperate module needs to find its way into the core
that accomodates such purposes?   I'm not sure: again, I'm still
learning, but this is becoming a rather difficult issue to "navigate"
(no pun intended- yeah right).




------------------------------------------------------------------------

April 19, 2005 - 17:51 : clydefrog

Re: puregin in #2


My patch still allows multiple independent books. When I speak of the
'top-level book page', I speak of the root page of an individual book.




------------------------------------------------------------------------

April 19, 2005 - 22:54 : clydefrog

Attachment: http://drupal.org/files/issues/book.module_1.patch (1.43 KB)

Here's an updated patch for HEAD. The earlier patch was against a
modified 4.6, so probably wouldn't have worked anyway.







More information about the drupal-devel mailing list