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

**URL:** <https://forum.shopware.com/t/how-to-pass-data-to-this-storefront-view-page-using-events/64912>\
**Category:** Programming (EN)\
**Created:** [21. Februar 2020 um 13:23 UTC](https://forum.shopware.com/t/how-to-pass-data-to-this-storefront-view-page-using-events/64912 "2020-02-21T13:23:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [26. Februar 2020 um 04:38 UTC](https://forum.shopware.com/t/how-to-pass-data-to-this-storefront-view-page-using-events/64912/2 "2020-02-26T04:38:01Z")

</div>

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

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

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

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

---

_[View the full topic](https://forum.shopware.com/t/how-to-pass-data-to-this-storefront-view-page-using-events/64912)._
