Hi.
Why you haven't added var to describe breadcrumbs separator? As is in yii1 $separator
https://github.com/yiisoft/yii2/blob/master/framework/yii/widgets/Breadcrumbs.php#L118
You can adjust the template and tag to add separator.
@cebe, how do you suggest to adjust a template?
If you configure it as ['itemTemplate'=>"<li>{link}</li> _my_separator_ \n"]
it will touch last element, where separator is not needed. The same situation is when you add it in a beginning.
And after all you should change "activeItemTemplate" too - so it will be a duplicate.
As i see, only solution is to override whole class, add $separator variable and use it in implode function...
Or may be i miss something obvious?
bootstrap does it with css:
.breadcrumb > li + li:before {
color: #ccc;
content: "/ ";
padding: 0 5px;
}
But won't it be easer just to specify a property than a whole css selectors in case of own design?
No.
Most helpful comment
bootstrap does it with css: