Releases: v0lume/yii2-meta-tags
Releases · v0lume/yii2-meta-tags
Migration fix
Namespace fix
To extend migration class and place it in main console/migrations folder
Fixes
Component init
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
Translating widget. Many languages was translated by google