PHPackages                             insolita/yii2-metacrumbs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. insolita/yii2-metacrumbs

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

insolita/yii2-metacrumbs
========================

alternative way for work with breadcrumbs and meta

1.0(8y ago)25MITPHPPHP &gt;=5.6

Since May 29Pushed 4y ago3 watchersCompare

[ Source](https://github.com/Insolita/yii2-metacrumbs)[ Packagist](https://packagist.org/packages/insolita/yii2-metacrumbs)[ RSS](/packages/insolita-yii2-metacrumbs/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

Yii2 meta-crumbs pack
=====================

[](#yii2-meta-crumbs-pack)

alternative way for work with breadcrumbs and metadata with open-graph-protocol helpers

also include NoLayoutBehavior for registration actions where layout must be skipped

[![Status](https://camo.githubusercontent.com/4de8ded50a8ee594a5f2c4b87ab1e81f1c007ef58be9dfdfe2186393976a3b76/68747470733a2f2f7472617669732d63692e6f72672f496e736f6c6974612f796969322d6d6574616372756d62732e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/4de8ded50a8ee594a5f2c4b87ab1e81f1c007ef58be9dfdfe2186393976a3b76/68747470733a2f2f7472617669732d63692e6f72672f496e736f6c6974612f796969322d6d6574616372756d62732e7376673f6272616e63683d6d6173746572)[![Latest Stable Version](https://camo.githubusercontent.com/e781c81a5a02b27cd9ca896dd12d253ec096a8bf672c864438c9933bd108a218/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e736f6c6974612f796969322d6d6574616372756d62732e737667)](https://camo.githubusercontent.com/e781c81a5a02b27cd9ca896dd12d253ec096a8bf672c864438c9933bd108a218/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e736f6c6974612f796969322d6d6574616372756d62732e737667)[![Total Downloads](https://camo.githubusercontent.com/a260a643761dc86290871728062bbe8118d7abe3bce9c3189cda4a13ad891675/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e736f6c6974612f796969322d6d6574616372756d62732e737667)](https://packagist.org/packages/insolita/yii2-metacrumbs)[![License](https://camo.githubusercontent.com/686bc19a75a8e64003e26e305191b36df906cd44dfb05dc2e5a4b08a7718afb9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696e736f6c6974612f796969322d6d6574616372756d62732e737667)](https://camo.githubusercontent.com/686bc19a75a8e64003e26e305191b36df906cd44dfb05dc2e5a4b08a7718afb9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696e736f6c6974612f796969322d6d6574616372756d62732e737667)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require --prefer-dist insolita/yii2-metacrumbs "~2.0"

```

or add

```
"insolita/yii2-metacrumbs": "~1.0"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

- register MetaCrumbsBootstrap, or manual register as singleton :

```
 \Yii::$container->setSingleton(IBreadcrumbCollection::class,BreadCrumbs::class);
```

and/or

```
 \Yii::$container->setSingleton(IMetaManager::class,MetaManager::class);

```

- add widget in layout

```

```

- add CrumbedControllerTrait in base controller (or in needed controllers) and register crumbs
- add MetaManagerTrait in needed controllers or base controller (also in service possible)

Controller Example

```
class ExampleController extends Controller
{
    use CrumbedControllerTrait;
    use MetaManagerTrait;

    public function actions()
    {
        return [
            'error'   => [
                'class' => 'yii\web\ErrorAction',
            ],
        ];
    }

   public function behaviors()
   {
       return [
           'nolayout'=>['class'=>NoLayoutBehavior::class,'actions' => ['ajax']]
           // 'nolayout'=>['class'=>NoLayoutBehavior::class,'actions' => ['index','about'],'except'=>true]

       ];
   }
    public function beforeAction($action)
    {
        $this->registerHomeCrumb();
        $this->registerIndexCrumb('Сайтег');
        if ($action->id == 'error') {
            $this->registerCurrentCrumb('Страница ошибок');
            $this->metaManager()->canonical();
        }
        return parent::beforeAction($action);
    }

   public function actionIndex()
   {
       $this->metaManager()->canonical(Url::to(['example/default']));
       $this->metaManager()->tag('description', 'Bla-bla-la-la-la');
       $this->metaManager()->prop('og:description', 'Bla-bla-bla');
       $this->metaManager()->prop('og:title', 'Bla-bla-bla');
       $this->metaManager()->keywords('Some, keywords,list');
       //Also
       return $this->render('index');
   }
    public function actionView(int $id)
    {
         $this->crumbCollection->addCrumb(
               new CrumbItem('Special crumb', Url::to(['some/page']), 20, ['target' => '_blank'])
          );
         $model = $this->pageFinder->findById($id);
         $this->registerCurrentCrumb($model->title);
         $this->metaManager()->ogMeta($model->title,Url::current([],true),$model->description,$model->cover,'article');
         return $this->render('about',['model'=>$model]);
    }

    ....
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3272d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/40f26825f8c130796e3151e6c076721cf5bb222c42148102bb31a341a1a5c789?d=identicon)[Insolita](/maintainers/Insolita)

---

Top Contributors

[![Insolita](https://avatars.githubusercontent.com/u/1847402?v=4)](https://github.com/Insolita "Insolita (11 commits)")

---

Tags

hacktoberfestyii2extension

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/insolita-yii2-metacrumbs/health.svg)

```
[![Health](https://phpackages.com/badges/insolita-yii2-metacrumbs/health.svg)](https://phpackages.com/packages/insolita-yii2-metacrumbs)
```

###  Alternatives

[vyants/yii2-daemon

Extension provides functionality for simple daemons creation and control

7859.0k](/packages/vyants-yii2-daemon)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
