[NFR] Make setLayout, and pick independent from eachother.
In reference to Issue #354, decouple the functions for setLayout and pick, so both may be used at the same time to choose custom layouts for their respective template levels.
For example, if I have some cases where I want to use different controller level layouts, such as a two column layout versus a three column layout. I would like the option to use pick to select a custom action level template if needed at the same time as using setLayout.
Example: setLayout('TwoColumnView'); pick('articleTemplate')
setLayout('ThreeColumnView'), pick('articleTemplate')
Closing this one: Not enough community support.
Feel free to discuss it in the forum and should more people decide that this is needed then we can revisit this.
This would be useful in my opinion. Currently, it seems I don't have the flexibility to render a different "action viewscript" and a different controller layout at the same time. It seems to be one or the other.
+1
+1
This can be achieved by template inheritance in Volt.When there will be allowed add block sections in other blocks like it's used in Jinja and Twig
+1
@valVk If not using volt then you are without this feature. Also, if using blocks you would need 2 blocks wouldn't you, both before and after. In which case I wonder if beforeTemplate, afterTemplate would work. Haven't tried yet.
FYI, this has been solved here:
https://forum.phalconphp.com/discussion/241/setlayout-and-pick-
Interesting