black-lamp/yii2-seo-breadcrumbs

Widget provides SEO schema for Breadcrumbs widget in Yii2 Framework

Installs: 1 370

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 0

Open Issues: 0

Type:yii2-extension

1.2.1 2018-12-20 21:00 UTC

This package is not auto-updated.

Last update: 2024-12-21 21:14:22 UTC


README

Widget provides SEO schema for Breadcrumbs widget in Yii2 Framework

Build Status Latest Stable Version Latest Unstable Version License

Installation

Run command

composer require black-lamp/yii2-seo-breadcrumbs

or add

"black-lamp/yii2-seo-breadcrumbs": "^1.1.0"

to the require section of your composer.json.

Using

Call widget in view layout

<?= \bl\seo\SeoBreadcrumbs::widget([
    'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?>

in view file just add a item or items to params array

$this->params['breadcrumbs'][] = 'Contacts';

or call the widget with configuration array in view file

<?= \bl\seo\SeoBreadcrumbs::widget([
    'homeLink' => [
        'label' => 'Home',
        'url' => \yii\helpers\Url::toRoute(['/']),
    ],
    'links' => 'Contacts',
]) ?>