hoksilato
(Hoksilato176)
1
Hi all,
I’m very eager to start with Yii 2.0 but I have a problem when use Twig template engine.
I set page title like below:
{% set this.title = 'My Yii Application' %}
But I get the error:
Unexpected token "punctuation" of value "." ("end of statement block" expected)
Please teach me how to fix it.
Thank you very much.
hoksilato
(Hoksilato176)
2
SOLVED!
For those who has the same problem, we have to set page title in controller instead. (thanks guys in Yii Framework Facebook Group)
You can do like this:
$this->view->title = "My Yii Application"
toof06
(toof06)
3
if you’ve correctly set twig plateform, and main.twig as default template that should be work :
{{ set(this, ‘title’, 'My Yii Application ') }}