Throw a 404 error

How do I throw a 404 error, I want to do this from a block.

In Concrete 5.6 I could do:

$v = View::getInstance();

But this doesn't seem to work anymore, I get the following error:

include(/Library/WebServer/Documents/site/concrete/views/.php): failed to open stream: No such file or directory

Does anyone know the best method?

Many thanks

View Replies:
Mnkras replied on at Permalink Reply
in 5.7 from your controller you can do:


where $this is an instance of PageController
bvcreative replied on at Permalink Reply
Hi Mnkras

Thanks for your response, unfortunately I get a Call to undefined method error. I am trying this from a block rather than a page though.

Many thanks