Answer the question
In order to leave comments, you need to log in
How to pass title and description to title?
Good morning. I have my own title, description, keywords in the database for different types of pages. How can I pass them to the title so that the page does not display a sticky title, but the one that is registered in the database for a specific category of the page,
I try to display all this like this
$this->title = $model->meta_title;
$this->registerMetaTag(['name' => 'description', 'content' => $model->meta_description]);
$this->registerMetaTag(['name' => 'keywords', 'content' => $model->meta_keywords]);
Answer the question
In order to leave comments, you need to log in
You are doing everything right. If this code is in the view and if there is an output in the layout (give the layout code).
From controller - $this->view->title
.
From the view -$this->title
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question