Book Navigation shouldn't be limited to View Mode 'full'

Created on 24 April 2019, almost 6 years ago
Updated 17 September 2024, 7 months ago

As reported in issues for Display Suite on 7.x (summary issue: https://www.drupal.org/project/ds/issues/2752185 ) the book module won't include navigation (and, by extension, the tree) when a Book Page uses any other display mode than "Full". This makes some sense in that you don't want navigation to appear as part of teasers, but there are other uses for Display Modes when this would be useful. For example, I use an Open Seadragon module (https://github.com/Islandora-CLAW/openseadragon), which uses a custom display mode for displaying large images.

Currently, I have three options:

  1. hack book_node_view to allow it:
    function book_node_view(array &$build, EntityInterface $node, EntityViewDisplayInterface $display, $view_mode) {
      if ($view_mode == 'full' || $view_mode == 'open_seadragon') {
    

    ,

  2. copying the book_node_view code into my own module but replacing the conditional with my desired display modes,
  3. or use BagZ's tactic of making a block .

Alternatively, which is where the feature request comes in, we make the allowable display modes configurable in the book module settings. Have the form list the available display modes and let the admin select the display modes that should display navigation.

Feature request
Status

Closed: duplicate

Version

1.0

Component
Book 

Last updated about 2 months ago

Created by

🇺🇸United States seth.e.shaw

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024