cms.page.init

Triggered in Cms\Classes\Controller.

Provides an opportunity to return a custom response from Controller->runPage() before AJAX handlers are executed

Example usage:

Event::listen('cms.page.init', function ((\Cms\Classes\Controller) $controller, (\Cms\Classes\Page) $page) {
    return \Cms\Classes\Page::loadCached('trick-theme-code', 'page-file-name');
});

Or

$controller->bindEvent('page.init', function ((\Cms\Classes\Page) $page) {
    return \Cms\Classes\Page::loadCached('trick-theme-code', 'page-file-name');
});