PHPackages                             fullmvc/yii2-metamanager - 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. fullmvc/yii2-metamanager

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

fullmvc/yii2-metamanager
========================

This is a meta tag manager for yii2.

048PHP

Since Jan 28Pushed 6y agoCompare

[ Source](https://github.com/fullmvc/yii2-metamanager)[ Packagist](https://packagist.org/packages/fullmvc/yii2-metamanager)[ RSS](/packages/fullmvc-yii2-metamanager/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (10)Used By (0)

Meta tag manager
================

[](#meta-tag-manager)

This is an extension for yii2 to help sites adding meta tag for better SEO score.

[![Total Downloads](https://camo.githubusercontent.com/203c8d737c0d6fab02f3d3ab01224d100c421cf6314c7d23f09d55c1d92d2f29/68747470733a2f2f706f7365722e707567782e6f72672f66756c6c6d76632f796969322d6d6574616d616e616765722f646f776e6c6f616473)](https://packagist.org/packages/fullmvc/yii2-metamanager)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist fullmvc/yii2-metamanager "dev-master"

```

or add

```
"fullmvc/yii2-metamanager": "dev-master"

```

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

Config
------

[](#config)

After you install this extension, you need to add this as a component in your config file like this:

```
'components' => [
    'metaManager' => 'fullmvc\metamanager\MetaManager',
],
```

Here you can specify the default values for each tag like:

```
'components => [
    'metaManager' => [
        'class' => 'fullmvc\metamanager\MetaManager',
        'titlePostfix' => ' - My Webshop',
        // default: 150, the maximum char length for description is 160 at 2019.04.08
        'descriptionLength' => 150,
        'defaultMetaDatas' => [
            'DC.description' => ['content' => 'My website\'s title'],
            'DC.title' => ['content' => 'This is my very own website'],
            'twitter:description' => ['content' => 'This is my very own website'],
            'twitter:title' => ['content' => 'My website\'s title'],
            'og:description' => ['content' => 'This is my very own website'],
            'og:title' => ['content' => 'My website\'s title'],
        ],
    ],
]
```

Usage
-----

[](#usage)

Call directly the register methods:

```
Yii::$app->metaManager->registerTitle('My website\'s title');
Yii::$app->metaManager->registerDescription('This is my very own website');
```

or register a model and the class will do all the work for you:

```
Yii::$app->metaManager->registerModel($myModel);
```

Pay attention to that the model need to have certain attribtues or getter methods to be able to add the meta tags that you want:

- Base title gethered via: getMetaTitle() method or metaTitle attribute, getTitle() method or title attribute of the model
- Base description gethered via: getMetaDescription() method or metaDescription attribute, getDescription() method or description attribute of the model
- Base keywords gethered via: getMetaKeywords() method or metaKeywords attribute, getKeywords() method or keywords attribute of the model
- Base image gethered via: getMetaImageUrl() method or metaImageUrl attribute, getImageUrl() method or imageUrl attribute of the model

These basic methods could be overwriten by specifing it in your config file like:

```
'components' => [
    'metaManager' => [
        'class' => 'fullmvc\metamanager\MetaManager',
        'metaAttributes'=> [
            'common\models\Blog' => [ // for a specific model
                'title' => 'myTitleAttribute',
                'description' => 'myDescriptionAttribute',
                'image' => 'myImageAttribute'
            ],

            ...

            [ // or by globally
                'title' => 'myTitleAttribute',
                'description' => 'myDescriptionAttribute',
                'image' => 'myImageAttribute'
            ]
        ]
    ]
],
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/45456263?v=4)[Sándor Gál](/maintainers/fullmvc)[@fullmvc](https://github.com/fullmvc)

---

Top Contributors

[![fullmvc](https://avatars.githubusercontent.com/u/45456263?v=4)](https://github.com/fullmvc "fullmvc (32 commits)")

### Embed Badge

![Health badge](/badges/fullmvc-yii2-metamanager/health.svg)

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

PHPackages © 2026

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