Dear all.
I want to add title and meta tags for seo automatic in head html. But i can declare it on my controller . How i can this. Please help me !!!
Dear all.
I want to add title and meta tags for seo automatic in head html. But i can declare it on my controller . How i can this. Please help me !!!
Welcome to forum.
Use registerMetaTag() http://www.yiiframework.com/doc-2.0/yii-web-view.html#registerMetaTag()-detail
and $title http://www.yiiframework.com/doc-2.0/yii-web-view.html#$title-detail
From within view use it like that: $this->…
From within controller use it like that: $this->getView()->…
You can use the yii2-taggedview extension: http://www.yiiframework.com/forum/index.php/topic/76372-yii2-taggedview/
Best regards!