Skip to content

Breadcrumbs are not displaying inline #22

@getlashified

Description

@getlashified

Good Day,
Please excuse me if I am wrong, I am still a junior developer. I would like to make note of an issue that I have found and provide a fix.

Implementing what is provided, the outcome is having each <li> on a new line:

@if(Breadcrumbs::has())
    @foreach (Breadcrumbs::current() as $crumbs)
        @if ($crumbs->url() && !$loop->last)
            <li class="breadcrumb-item">
                <a href="{{ $crumbs->url() }}">
                    {{ $crumbs->title() }}
                </a>
            </li>
        @else
            <li class="breadcrumb-item active">
                {{ $crumbs->title() }}
            </li>
        @endif
    @endforeach
@endif

View of display:

Screenshot_2020-11-19 Edit Book Gouws Freeway · Electronic Library Assistant

In order to display the breadcrumbs inline I have to add the <ol> tag back from "tabuna/breadcrumbs": "^1.0" and this seems to be working:

        @if(Breadcrumbs::has())
          <ol class="breadcrumb border-0 m-0">
            @foreach (Breadcrumbs::current() as $crumbs)
              @if ($crumbs->url() && !$loop->last)
                <li class="breadcrumb-item">
                  <a href="{{ $crumbs->url() }}">
                    {{ $crumbs->title() }}
                  </a>
                </li>
              @else
                <li class="breadcrumb-item active">
                  {{ $crumbs->title() }}
                </li>
              @endif
            @endforeach
          </ol>
        @endif

View of working display:
Screenshot_2020-11-19 Edit Book Gouws Freeway · Electronic Library Assistant(1)

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions