configure starting level

Created on 28 January 2021, almost 4 years ago
Updated 22 November 2023, about 1 year ago

Problem/Motivation

First: Thanks for this live-saving module! I cant believe that the display of the books content on other (basic-) pages is needed so rarely.

My Question is, wether it is possible to make the starting level configurable. The aim would be to have only the book-pages listed, without the book itself as root-element.

✨ Feature request
Status

Closed: duplicate

Version

1.0

Component

User interface

Created by

πŸ‡©πŸ‡ͺGermany beder

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.

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

    I actually retract my prior comment about this being outside the scope of this module. I'm not sure exactly what I was thinking at the time of writing. I may have misread. This would be a fine development.

  • Status changed to Postponed: needs info over 1 year ago
  • πŸ‡©πŸ‡ͺGermany simonbaese Berlin

    I am leaning towards putting this issue to "Won't fix". I think, we should stick with core functionality of setting the root element when multiple books are displayed and not showing the root element if only one book is displayed.

    If you like to change this behavior, you could use a preprocess hook as follows. I haven't tested this in all scenarios - let me know if you have trouble with this.

    function MYTHEME_preprocess_block__custom_book_navigation(&$variables) {
      foreach (\Drupal\Core\Render\Element::children($variables['content']) as $bid) {
        $navigation = &$variables['content'][$bid];
        foreach ($navigation['#items'] as $id => $item) {
          $navigation['#items'] += $item['below'];
          unset($navigation['#items'][$id]);
        }
      }
    }
    

    Please send your feedback.

  • Status changed to Closed: duplicate about 1 year ago
  • πŸ‡©πŸ‡ͺGermany simonbaese Berlin

    Closing this issue as duplicate and proceeding with issue ✨ Start level and active branch of tree Needs review as there is already a suggested patch.

Production build 0.71.5 2024