diglactic / laravel-breadcrumbs

Laravel Breadcrumbs - A simple Laravel-style way to create breadcrumbs.
https://packagist.org/packages/diglactic/laravel-breadcrumbs
MIT License
868 stars 63 forks source link

How to remove the '-' after the name #24

Closed donchoborisov closed 3 years ago

donchoborisov commented 3 years ago

Hi there,

Is there any option to remove the ''-" after the name?

Thank you very much in advance

donchoborisov commented 3 years ago

image

donchoborisov commented 3 years ago

I fix the issue by removing the class active in bootstrap4.blade.php and i just replace that class with text-muted

`@unless ($breadcrumbs->isEmpty())

<ol class="breadcrumb">
    @foreach ($breadcrumbs as $breadcrumb)

        @if ($breadcrumb->url && !$loop->last)
            <li class="breadcrumb-item "><a href="{{ $breadcrumb->url }}">{{ $breadcrumb->title }}</a></li>
        @else
            <li class="breadcrumb-item text-muted  ">{{ $breadcrumb->title }}</li>
        @endif

    @endforeach
</ol>

@endunless`

shengslogar commented 3 years ago

Hmm... sounds like you're doing something special with Bootstrap to cause this behavior? There shouldn't be any special characters attached to breadcrumbs out of the box.

Glad you were able to figure it out either way.

https://getbootstrap.com/docs/4.0/components/breadcrumb/

donchoborisov commented 3 years ago

Nothing special so far :)

Anyway thanks for your quick response and your help

shengslogar commented 3 years ago

If you figure out what's causing the issue, happy to take a closer look. Afaik this is not default Bootstrap 4 behavior.

donchoborisov commented 3 years ago

on of my pages @extends('layouts.default') @section('content')

{{ Breadcrumbs::render('policies') }}

@foreach($policies as $policy)
{{$policy->name}}
@endforeach

@stop

bootstrap 4 file ` @unless ($breadcrumbs->isEmpty())

<ol class="breadcrumb">
    @foreach ($breadcrumbs as $breadcrumb)

        @if ($breadcrumb->url && !$loop->last)
            <li class="breadcrumb-item  "><a href="{{ $breadcrumb->url }}">{{ $breadcrumb->title }}</a></li>
        @else
            <li class="breadcrumb-item text-muted  ">{{ $breadcrumb->title }}</li>
        @endif

    @endforeach
</ol>

@endunless

`

donchoborisov commented 3 years ago

which part you want me to show you?

shengslogar commented 3 years ago

If swapping class="active" for class="text-muted" solved it, it's likely there's some CSS style overriding Bootstrap that's causing this issue. I probably can't solve this by looking over your Blade templates.

I would inspect the component in your browser and work backwards to figure this one out.

donchoborisov commented 3 years ago

Yes you are right maybe something is playing behind in my css i will double check this.