Some interesting findings from web-dev land…
You can display plugin layouts (and views) from another plugin by doing this in your controller.
This example is for a layout:
1234$view_paths = Configure::read(’viewPaths’);
array_unshift($view_paths, (APP.’plugins’.DS.’plugin_name’.DS.’views’.DS));
Configure::write(’viewPaths’, $view_paths);
$this->layout = ‘layout_name’;
You can place this code inside a wrapper method in your plugin app controller to make it accessible from other controllers within the same plugin too ;] Obviously [...]
Woo hoo! It’s possible to override CakePHP plugin views just like in Rails using the Engines plugin. Documentation on how to do it is a bit thin on the ground though.
Say you created a CakePHP plugin called ‘cms’ and you had a plugin controller called ‘pages’ inside the cms plugin. Just place the views you [...]