How to pass data to this storefront view page using events ?

We can pass custom data to view the page by using StorefrontRenderEvent

    public static function getSubscribedEvents(): array
    {
        return [
            StorefrontRenderEvent::class => ‘onStorefrontRender’
        ];
    }

    public function onStorefrontRender(StorefrontRenderEvent $event)
    {
        $route = $event->getRequest()->get(’_route’);

        if($route == ‘frontend.product.reviews’)
        {
            $event->setParameter(‘testParam’, ‘testParamValue’);
        }
    }

4 „Gefällt mir“