R
R
Roman Savitsky2017-02-09 18:29:08
Yii
Roman Savitsky, 2017-02-09 18:29:08

Pass titile and description received from Yii2 database to header?

Good afternoon everyone!
According to the standard in Yii2 page templates, at the top I catch title In the file responsible for the site header, this case is displayed in this way . Thanks in advance.
$this->title = 'Получаемый контент из БД';
<title><?= Html::encode($this->title) ?></title>
$this->title

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Savitsky, 2017-02-09
@PRC

In page template files, this is how you can generate meta titles
Maybe there are other options?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question