Cannot use View pick and setLayout at same time
Within the same action, I cannot use setLayout and pick together. When using both at the same time, only the pick function works. If I comment out the call to pick, then setLayout works properly.
public function indexAction()
{
$this->view->setLayout('twocolumn');
$this->view->pick("index/hello");
}
Sorry but this is not a bug, this is the intended behavior
If I understand the layouts correctly, Phalcon has a main template, a controller level template, and an action level template. Three separate entities which each have a function to change default behavior of which template is used for rendering at each of these levels. (setMainView, setLayout, and pick) From a design perspective, it doesn't make sense to be able to call setLayout with a custom controller level template, and then call pick for a custom action level template would set the custom controller template back to default. They should be completely independent of each other.
How about this being a new feature request if not a bug?
@netblue Can you please close this issue and create a new one [NFR] explaining a bit about the new functionality and if need be referencing this issue?
I am not sure when this will be done, since we have a lot of other requests but we can definitely check it out and put it in the roadmap.
Thanks!