Answer the question
In order to leave comments, you need to log in
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.
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
.
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 questionAsk a Question
731 491 924 answers to any question