- πΊπΈ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
about 1 year ago 1:19pm 24 September 2023 - π©πͺ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 10:50am 22 November 2023 - π©πͺ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.