Is there a way to make the Node->Book Navigation element show the entire book hierarchy instead of the children of the current node? I've trued overriding theme_preprocess_book_navigation and the template file with no success.

If I add the Book Navigation Block it works like this, but I can't use the block in a Panel content area.

I'm also looking to display the hierarchy in a less formatted way (I don't want the collapsed bits). Any tips?

CommentFileSizeAuthor
#8 panesourceconfig.png16.86 KBLetharion
#5 context-tab.png6.18 KBmerlinofchaos
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Status: Active » Fixed

on the 'Contexts' tab, add the relationship: "Book Parent". Choose the 'top' option.

Then select that in the navigation pane's settings instead of the current node.

balancestuff’s picture

Thanks, I will try that.

Can you point me to the Context tab?

Update: Is the Context tab only available for Panel Pages, not Panel Nodes? I see it there, but no "Book Parent" option to add.

balancestuff’s picture

As an additional update, I am experimenting with overriding the Node Template for the Panels content type. This may be what is required.

It looks like with the Context in the Node Template I can use the context in panels added to the Node Template layout, but not to content of that kind.

This doesn't quite work, although it may be something I am doing wrong. I can set up the Context, but it's only visible to elements in the overall 'Node Template' not the actual Nodes of the Panel content type made from it... Which doesn't work with my desired layout.

balancestuff’s picture

Status: Fixed » Active
merlinofchaos’s picture

FileSize
6.18 KB

merlinofchaos’s picture

Note that I make the assumption that you already have a node context of some sort available. The 'book parent' will be in Relationships. If overriding the node template, it should just appear there to be added.

balancestuff’s picture

I think I'm getting closer, but I'm still unable to select the new Relationship in my Panel page content.

First question: In the 'relationship' config screen, should 'Node' be set to 'Node being viewed'?

Does my question make sense? As I understand it, there's a Node Template which can be displayed as a Panel. The Node is then displayed as Node Content in the selected Panel region, and the Node Content may also be a Panel. I'm trying to get the Book Navigation in a Node Content item to display the full book hierarchy.

Finally, is there a good doc you can point me too so you don't have to keep dealing with my questions. :)

Letharion’s picture

FileSize
16.86 KB

Your question makes sense. In the relationship config screen, you should pick the content you want to be the "Source" of the relationship. In the vast majority of cases you have only a single option, being "Node being viewed", as you suggest.

After that, when you add new content, such as "Book Navigation" as you want, to a page, you can however pick one of two sources, since in addition to "Node being viewed", we have now added "Book parent" as well. See attached image. That should be all.

No, the docs are unfortunately not very good, still, work is in progress, but with everyone being a volunteer, it takes time.

Letharion’s picture

Category: feature » support
Status: Active » Fixed

Changing to support request since the feature is already available.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jwilson3’s picture

Perhaps technically speaking, #1 does solve the issue that the Book navigation pane only shows the current level, however, I question the actual utility of the solution to show the top level using a context relationship joined on the book parent. If you select 'Top level book' for the Relationship, as Earl suggested in #1, the Book navigation pane show the book's Level 1 links but it doesn't *expand* the book hierarchy down showing an active-trail if you are down inside a L2 or L3 level book page.

There is a parallel discussion about replicating the normal Book navigation block on on #640226: Adding Book Navigation Block to panels and mini-panels, so I wont reopen... just linking and thinking.

balancestuff’s picture

I ended up adding a "Menu" panel item to each page that has the book navigation in it. Worked great, with the major concern that I don't have to update a couple dozen pages if the menu structure changes resolved.

Divya Rathanlal’s picture

Discussions #5 and #8 greatly helped me. Thanks!

jelo’s picture

I ended up using Menu Block module which offered some other advantages and fixed my problems with book navigation in panels:
https://drupal.org/project/menu_block

J.