Book Traversal Links Section is Missing

Created on 13 November 2024, 2 months ago

When I initially installed this module (the 2.0.0-alpha1 version), there was a 'Book Traversal Links' section appearing below the book page content.

This was very helpful, as it allowed the user to quickly go from the current page to the previous or next page in the book tree...

However, for some reason, this is not appearing anymore. I've tested with the Olivero theme, along with DXPR (the normal default theme this site is using).

Now, looking at /admin/structure/types/manage/book/display, I am seeing "Links" as an active field item (below Title and Body). I assume that refers to the 'Book Traversal Links' functionality.

I also tried to see if this could be added via a block. But when clicking 'Place block' in the desired region, there is no option for this that I can see.

So I'm not sure how this is intended to be implemented, or why it seems to have gone away. But it would be great to bring this feature -- which existed in the old Core module -- back again.

✨ Feature request
Status

Active

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States jimmb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jimmb
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Going to need more info as I'm seeing the traversal links.

  • πŸ‡ΊπŸ‡ΈUnited States jimmb

    Thanks for the reply. I have just updated the Book module to 2.0.0, and tested with 3 different themes (DXPR, Bootstrap5 3.0.14, and Olivero 10.4.0). In all cases, I am still not seeing the Traversial Links. I've attached a screenshot of what I am seeing with the Olivero theme (and while logged in).

    The only difference between logged in or not is that, when logged in, I am seeing "Add child page", "Add sibling page", and "Printer-friendly version" links.

    Note that I believe the "Printer-friendly version" link should show for anonymous users as well. So that seems to be a separate bug/issue that I can open separately if needed ...

    As for my settings, overall, it's very straightforward. At /admin/structure/book/settings, I have selected "Book page" for 'Content types allowed in book outlines', "Book page" for 'Content type for the Add child page link' and "Sort by weight" for 'Book list sorting for administrative pages, outlines, and menus'.

    This is a Drupal 10 site, and I have 2 books created currently. I'm not sure what else you'd like to know or would be helpful, but will be happy to answer any questions or provide login credentials privately to look into this on the actual staging site.

    I've personally spent a lot of time writing this documentation, and it is being used currently by actual customers. So it would *really* be great if this could be figured out, since it's not very user friendly if the traversial links aren't available on the book pages.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Did you check your view displays

  • ok, I had the same problem switching from 1.0.0 to 2.0.0.

    Adding "Book navigation" to the visible information as suggested by smustgrave fixed most but not everything.

    Apparently, I had created a few nodes with content type "page" and added them to books. On those pages, the navigation links still did not work.

    To fix this I had to convert content type of those individual nodes:

    drush eval "
    \$nids = [17,68,70];                                           
    foreach (\$nids as \$nid) {
      \$node = \Drupal\node\Entity\Node::load(\$nid);
      \$node->set('type', 'book');
      \$node->save();
    }
    "

    Maybe a 2.0.1 release should do this conversion automatically, or at least give a warning of it detects content nodes with the wrong type being part of books?

  • πŸ‡ΊπŸ‡ΈUnited States jimmb

    Thanks smustgrave and sd123 for the suggestions! For me, it also worked to place 'Book navigation' into the active area at /admin/structure/types/manage/book/display

    I probably looked at this before, but was confused because there was a 'Links' item there which I assumed referred to the traversal links, not the default Drupal teaser links (which, yes, Drupal should be naming more helpfully) ....

    So this is great, and now it looks like the attached screenshot. And now this makes me wish there were some further config options in the UI here ...

    For example, it would also be great to be able to edit the traversal links title, since "Book traversal links for Eligibility Files Management" is pretty unwieldy. At least being able to hide it would be nice, along with changing the text string logic).

    So any further advice on doing this would be appreciated. Otherwise, I think CSS should be sufficient for the other tweaks I'd like to make here.

  • Status changed to Postponed: needs info 6 days ago
  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

    Go to you content type, "Manage display". Make sure the "Book navigation" field is above the "Disabled" line.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Maybe we add some help text to the README for settings form.

Production build 0.71.5 2024