It would be useful to integrate Custom Page with Context Layout. The ideal use for this would be a landing page that you still want non-developers to be able to change.
You could create a custom page, set a context. Then the reaction to that is a context layout. You can then put blocks into the relevant regions.
Custom Page lets you do this but will throw an error because there won't be any template file. It would be useful to break this dependancy on having template files.
My patch looks to see if one of the set contexts has a context layout reaction. If so it does not give an error and renders the page as normal.
Comments
Comment #1
edward_or commentedHaving undergone a crash course in git today and learned about unified patches I submit a unified version of the previous patch.
Comment #2
irakli commentedeoriordan,
that's an interesting idea, but there're two problems with the patch:
1. code will fail if context_layout module is not enabled because you are introducing hard dependency. We need code that will implement your logic when/if context_layout module is present (I would check on the existence of the function you are calling, rather than module_exist, since former is probably faster, however we should probably test which one is faster), but run old, context_layout-unaware code if the module is not present.
2. if we add functionality to 6.x branch, we should add it to 7.x one too. Any chance you might be able to roll a patch for that too?
Thanks!
Comment #3
edward_or commentedI have fixed this now by added a test for the existence of the Context function we call. This is with a simple function_exists() test.
Comment #4
edward_or commentedHere is a d7 version.
I ran into this issue when testing #1108510: Activating Context Layouts should not make the blocks reaction disappear which meant I could not test against Context 7.x-3.0-beta1. With the dev version of Context for d7 this issue is resolved and the patch works perfectly.