Answer the question
In order to leave comments, you need to log in
How to organize nested views in Yii2? Or make the template polymorphic?
In Yii2, it is quite convenient to set a template and render views. But how to make a more complex organization is not clear.
The goal is this - when forming a page, you need to generate standard pages with a template, and add a block that can vary depending on sections or any factors. I have two methods in my head - either make a nested organization of views (insert several different view blocks into the template like a blade in laravel), or make the template manageable so that certain blocks are generated in it as needed.
The idea that such functionality is already implemented in the framework does not leave me, I'm just looking in the wrong place. Has anyone implemented such a scheme? Share your experience?
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