Hello everyone! I am not sure where I have to define title tag, meta description, keywords, author, breadcrumbs and other tags? In controller by:
...
public function actionIndex()
{
$this->view->registerMetaTag([
'name' => 'test',
'content' => 'Test content',
], 'test');
...
return $this->render('index', [
'dataProvider' => $dataProvider,
]);
}
or in the view by:
...
$this->title = $model->name;
$this->params['breadcrumbs'][] = $model->name;
$this->registerMetaTag([
'name' => 'description',
'content' => $model->meta_description,
], 'description');
...
Please help me. Want “experienced” answer