#28, #30: Fixed the breadcrumb on the individual photo page

This commit is contained in:
Andy Heathershaw 2017-09-10 07:27:56 +01:00
parent 81a0ea28c7
commit 4ccd665920

View File

@ -2,8 +2,14 @@
@section('title', $photo->name) @section('title', $photo->name)
@section('breadcrumb') @section('breadcrumb')
<li class="breadcrumb-item"><a href="{{ route('home') }}">Gallery</a></li> <li class="breadcrumb-item"><a href="{{ route('home') }}"><i class="fa fa-fw fa-home"></i></a></li>
@foreach ($album->albumParentTree() as $parentAlbum)
@if ($parentAlbum->id == $photo->album->id)
<li class="breadcrumb-item"><a href="{{ $return_album_url }}">{{ $photo->album->name }}</a></li> <li class="breadcrumb-item"><a href="{{ $return_album_url }}">{{ $photo->album->name }}</a></li>
@else
<li class="breadcrumb-item"><a href="{{ $parentAlbum->url() }}">{{ $parentAlbum->name }}</a></li>
@endif
@endforeach
<li class="breadcrumb-item active">{{ $photo->name }}</li> <li class="breadcrumb-item active">{{ $photo->name }}</li>
@endsection @endsection