cms.page.beforeRenderPartial

Triggered in Cms\Classes\Controller\HasRenderers.

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

Example usage:

Event::listen('cms.page.beforeRenderPartial', function ((\Cms\Classes\Controller) $controller, (string) $partialName) {
    return Cms\Classes\Partial::loadCached($theme, 'custom-partial-name');
});

Or

$controller->bindEvent('page.beforeRenderPartial', function ((string) $partialName) {
    return Cms\Classes\Partial::loadCached($theme, 'custom-partial-name');
});