dev-master
9999999-devSet SEO variables (Title, Description etc) from every model;
GPL-3.0+
The Requires
by Marcin Rozmarynowski
helper seo activerecord seo redirect 301 seo redirects
Set SEO variables (Title, Description etc) from every model;
Set SEO variables (Title, Description etc) from every model;, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist warsztatweb/yii2-seo-helper "*"
or add, (*4)
"warsztatweb/yii2-seo-helper": "*"
to the require section of your composer.json
file., (*5)
Once the extension is installed, simply use it in your code by:, (*6)
Attach the component in your config file:, (*7)
'components' => [ 'seo' => [ 'class' => 'warsztatweb\seo\Helper', ], ],
echo Yii::$app->seo->set($model);
$model should have these attributes to work properly:, (*8)
meta_title meta_description meta_keywords h1 params[] eg: params["og:image"], (*9)
Module can handla other columns like title,name,nazwa,tytul,tyt for meta_title; columns like lead, description, desc, html for meta_description. It looks for column named baner, banner, thumb, image for automaticlay generated og:image property., (*10)
og tags are generated automaticaly based on meta_title, meta_desription, (*11)
//todo, (*12)
For enabling SEO Redirect add to configuration file, (*13)
'errorHandler' => [ 'class' => 'warsztatweb\seo\Redirect', ],
Based on Amirax SEO Tools for Yii 2 https://github.com/Amirax/yii2-seo-tools, (*14)
Set SEO variables (Title, Description etc) from every model;
GPL-3.0+
helper seo activerecord seo redirect 301 seo redirects