cms.page.beforeRenderContent

Triggered in Cms\Classes\Controller\HasRenderers.

Provides an opportunity to manipulate the name of the content file being rendered before it renders

Example usage:

Event::listen('cms.page.beforeRenderContent', function ((\Cms\Classes\Controller) $controller, (string) $contentName) {
    return Cms\Classes\Content::loadCached($theme, 'custom-content-name');
});

Or

$controller->bindEvent('page.beforeRenderContent', function ((string) $contentName) {
    return Cms\Classes\Content::loadCached($theme, 'custom-content-name');
});