Commit 22df0739 authored by Martin Anderson-Clutz's avatar Martin Anderson-Clutz
Browse files

Issue #3222025 by Ahmad Abbad: Active trail for parent book

parent 287a9f27
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -125,6 +125,10 @@ class CustomBookNavigationBlock extends BookNavigationBlock {
          // Retrieve the full menu, to the specified depth.
          $data = $this->bookManager->bookTreeAllData($book_id, $book, $max_levels, $always_expand);
          $book_menus[$book_id] = $this->bookManager->bookTreeOutput($data);
          $book_menus[$book_id]['#items'][$book_id]['in_active_trail'] = FALSE;
          if ($book_menus[$book_id]['#items'][$book_id]['original_link']['bid'] == $current_bid) {
            $book_menus[$book_id]['#items'][$book_id]['in_active_trail'] = TRUE;
          }
        }
        $book_menus[$book_id] += [
          '#book_title' => $book['title'],