Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294802

Add Option to Display Top Level page in BookNavigationBlock

$
0
0

If the BookNavigationBlock does not have the configuration option "all pages", it only displays the subpages in the navigation block.

On line 143 there is this code:

          $data = $this->bookManager->bookTreeAllData($node->book['bid'], $node->book);
          $book_menus[$book_id] = $this->bookManager->bookTreeOutput($data);

which outputs the items in the book using ->bookTreeOutput()

but for some reason, on line 177, it only outputs the subpages:

 $tree = $this->bookManager->bookTreeAllData($node->book['bid'], $node->book);

        // There should only be one element at the top level.
        $data = array_shift($tree);
        $below = $this->bookManager->bookTreeOutput($data['below']);
        if (!empty($below)) {
          return $below;
        }

I guess some developers would only want the some pages, so I'm not sure if this is a bug, or should be an option.


Viewing all articles
Browse latest Browse all 294802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>