Skip to content

Releases: v0lume/yii2-meta-tags

Migration fix

18 Jul 22:39
Compare
Choose a tag to compare

Namespace fix

05 Feb 08:20
Compare
Choose a tag to compare

To extend migration class and place it in main console/migrations folder

Fixes

23 Mar 20:12
Compare
Choose a tag to compare

7a15791
Fixing empty $model, while data added to db manually (sql or dump).

Component init

13 Mar 21:29
Compare
Choose a tag to compare

Added MetaTagsComponent component to fast register meta tags with csrf.

You can use MetaTagsComponent to perform auto registration meta tags

Configure MetaTagsComponent in main.php config:

...
'components' => [
    ...
    'metaTags' => [
        'class' => 'v0lume\yii2\metaTags\MetaTagsComponent',
        'generateCsrf' => false,
        'generateOg' => true,
    ],
    ...
],
...

And then, in your layouts or views or controller action

$model = \common\models\Page::findOne(['url' => '/']);

Yii::$app->metaTags->register($model);

If passed $model was attached MetaTagBehavior, component will register meta tags for that model. If MetaTagBehavior wasn't attached or model not passed, and generateCsrf is set to true, component will generate only csrf meta tags.

Internationalization

13 Mar 01:46
Compare
Choose a tag to compare

Translating widget. Many languages was translated by google

First release

12 Mar 19:35
Compare
Choose a tag to compare

This is the first release of widget
99da00a54c