cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

[NFR] Make setLayout, and pick independent from eachother.

Open netblue opened this issue 13 years ago • 8 comments

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')

netblue avatar Feb 22 '13 23:02 netblue

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.

niden avatar May 23 '13 02:05 niden

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.

eruvio avatar Nov 29 '13 21:11 eruvio

+1

samuraee avatar Oct 08 '14 22:10 samuraee

+1

ruxta avatar Nov 03 '15 04:11 ruxta

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

valVk avatar Nov 03 '15 10:11 valVk

+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.

robin-1 avatar Jan 13 '16 14:01 robin-1

FYI, this has been solved here:

https://forum.phalconphp.com/discussion/241/setlayout-and-pick-

robin-1 avatar Jan 13 '16 14:01 robin-1

Interesting

valVk avatar Feb 19 '16 13:02 valVk