dev-master
9999999-devAdd open graph tags
MIT
The Requires
extension yii2 opengraph
v0.0.1
0.0.1.0Add open graph tags
MIT
The Requires
extension yii2 opengraph
Add open graph tags
Add open graph tags, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist fgh151/yii2-opengraph "*"
or add, (*4)
"fgh151/yii2-opengraph": "*"
to the require section of your composer.json
file., (*5)
Once the extension is installed, add it to component config :, (*6)
'components' => [ 'opengraph' => [ 'class' => 'fgh151\opengraph\OpenGraph', ], //.... ],
Then in controller or view set og tags, (*7)
Yii::$app->opengraph->title = 'My post'; Yii::$app->opengraph->description = 'My post description'; Yii::$app->opengraph->image = 'http://site.ru/image.jpg';
Add open graph tags
MIT
extension yii2 opengraph
Add open graph tags
MIT
extension yii2 opengraph