Q
Q
q3vl2017-05-25 22:21:21
Phalcon
q3vl, 2017-05-25 22:21:21

View generation order?

Hello, the essence of the problem is as follows: There is a main layout (main.phtml) and a view (child/first.phtml). Auto rendering process disabled - $application->useImplicitView(false); The controller directly calls the view $this->view->render('child', 'first'). layout is included in the same place - $this->view->setTemplateBefore('main'); everything works fine, i.e. the content of the child/first view is inserted into the body tag of the main layout.
e92a7aba2fab4e3c8e280bf9945cf3e3.jpg
But if you add text / html to this view, then the generation order breaks: first the view falls out onto the page, then the main layout
02c05c5c2ffa47379d2a9782d25c233e.jpg.
Perhaps someone faced such a problem.
I know that there are other ways of generating, this one is of interest.
For clarity, I created a repository: Phalcon
You need to insert not 1-2 lines into the internal view, but 50-100 lines
OS ubuntu 16.04, php 7, phalcon 3
Thanks in advance

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question