A
A
Artur Galyaev2020-07-12 13:35:56
Yii
Artur Galyaev, 2020-07-12 13:35:56

How do views work in layout in yii?

A layout is rendered through the controller, and a view is rendered in it, but at the same time, a page title can be declared in the view itself. How can we change the title from the view if the layout is rendered first?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2020-07-12
@art5455

You are wrong, look in layout. There is a content variable. It contains the result of rendering view. It follows from this that the view is rendered first, then the layout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question