I want to change some content of my pages before it is displayed but i have tried the codes below but no changes seem to happen either using Filter or Event. Below are what i have tried separately but none of them seem to work.
class Filter
{
public static function ipSendResponse($response)
{
if (is_object($response) && $response instanceof \Ip\Response\Layout) {
$response->setContent('DUMMY CONTENT');
}
return $response;
}
}
class Event
{
public static function ipBeforeResponseSent($response)
{
$response->setContent('DUMMY CONTENT');
}
}
what am i doing wrong and what is the best way to change the entire content on a page?
Also this is a Multisite Site. If that makes a difference.
I want to change some content of my pages before it is displayed but i have tried the codes below but no changes seem to happen either using Filter or Event. Below are what i have tried separately but none of them seem to work.
class Filter { public static function ipSendResponse($response) { if (is_object($response) && $response instanceof \Ip\Response\Layout) { $response->setContent('DUMMY CONTENT'); }
}
class Event { public static function ipBeforeResponseSent($response) { $response->setContent('DUMMY CONTENT'); } }
what am i doing wrong and what is the best way to change the entire content on a page? Also this is a Multisite Site. If that makes a difference.