[drupal-devel] [feature] Include top-level parent on book
navigation block
clydefrog
drupal-devel at drupal.org
Wed Apr 27 00:01:11 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: clydefrog
Status: patch
Attachment: http://drupal.org/files/issues/book.module_2.patch (1.56 KB)
It is true that this adds another level of indentation, but I don't
think it's enough to worry about. If things get crowded on your site,
you can modify your theme and you should probably consider rearranging
your book's organization. The parent's title is shown in the title bar
of the block, but it's not a link so it doesn't help with navigation. I
considered making it a link, but that would be inconsistent: no other
block has a link in the title.
The updated patch syncs with HEAD. It was generated with cvs diff -u;
hope that's all right.
Does anyone else have an opinion on this patch? Please give me some
feedback! Thanks.
clydefrog
Previous comments:
------------------------------------------------------------------------
April 18, 2005 - 22: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 18, 2005 - 22:53 : clydefrog
Attachment: http://drupal.org/files/issues/book.module_0.patch (1.38 KB)
Sorry... Here's the patch.
------------------------------------------------------------------------
April 19, 2005 - 09: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 - 10: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 - 10: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 - 15: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.
------------------------------------------------------------------------
April 20, 2005 - 13:33 : bomarmonk
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
------------------------------------------------------------------------
April 20, 2005 - 16:06 : clydefrog
bomarmonk, I answered your question in the forum. Please don't double
post.
------------------------------------------------------------------------
April 22, 2005 - 23:48 : puregin
Sorry for missing the point of your patch in my previous posting,
clydefrog. Now that I'm clued in, I agree that it's useful to have the
parent listed in the hierarchy. I'm not in a position to install the
patch yet, so I can't comment on how well it works. One possible
quibble - this would add an additional level of indentation, which
might cause excessive rightward drift and 'squashing' of titles in the
display block. Also, though it's not completely consistent or
intuitive, the parent title is presented as the book navigation block
title, so it's not completely 'missing'.
More information about the drupal-devel
mailing list