1
0

Fix: Current page in dossier was not marked as selected

This commit is contained in:
Richard Dern 2024-04-26 23:26:45 +02:00
parent 7726b3c3e0
commit f66aa12053
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ class="{!! $mainLink['classes'] !!}"
<details class="drop down">
<summary>Sommaire</summary>
<nav>
@include('components.table-of-contents', ['toc' => $dossier->getDirectChildren()])
@include('components.table-of-contents', ['toc' => $dossier->getDirectChildren(), 'bundle' => $bundle])
</nav>
</details>
@endif

View File

@ -1,13 +1,13 @@
<ul>
@foreach ($toc as $item)
<li>
@if ('/' . urldecode(request()->path()) . '/' === $item->getPath())
@if ($bundle->getPath() === $item->getPath())
<strong>{{ $item->getArticleTitle() }}</strong>
@else
<a href="{{ $item->getPath() }}">{{ $item->getArticleTitle() }}</a>
@endif
@if (!empty($item->getDirectChildren()))
@include('components.table-of-contents', ['toc' => $item->getDirectChildren()])
@include('components.table-of-contents', ['toc' => $item->getDirectChildren(), 'bundle' => $bundle])
@endif
</li>
@endforeach