// For CakePHP before 3.1 public $theme = 'Modern'; public function beforeRender(\Cake\Event\Event $event) { $this->viewBuilder()->setTheme('Modern'); // For CakePHP before 3.5 $this->viewBuilder()->theme('Modern'); }
But how can i declare my plugin to use the theme i created and activated in the Backend of Croogo?
Thank you and Best Regards
class MyPluginAppController extends AppController{
public function beforeFilter() {
if (!isset($this->request->params['admin']) && isset($this->request->params['manage'])) { $this->layout = 'MyPlugin.my_custom_layout_name'; }
....