cms.page.init
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
$CmsController->bindEvent('page.init', function ((\Cms\Classes\Page) $page) {
return \Cms\Classes\Page::loadCached('trick-theme-code', 'page-file-name');
});
Usage
Triggers
Class or file | Line |
---|---|
Cms\Classes\Controller
|
379 |
Copyright © 2024 Winter CMS