Skip to content
Discussion options

You must be logged in to vote

I moved the rendering logic over to Element::render() and added an EVENT_RENDER event from there, for Craft 5.8: (013f83c)

use craft\base\Element;
use craft\events\RenderElementEvent;
use yii\base\Event;

Event::on(Element::class, Element::EVENT_RENDER, function(RenderElementEvent $event) {
    /** @var Element $element */
    $element = $event->sender;

    $event->output = '';
});

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by brandonkelly
Comment options

You must be logged in to vote
1 reply
@brandonkelly
Comment options

Comment options

You must be logged in to vote
2 replies
@brandonkelly
Comment options

@leevigraham
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants