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
Requires
- php: >=5.6.0
- yiisoft/yii2: ^2.0.3
Requires (Dev)
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
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', ]) ?>