Jump to content

Module: Smarty for the TemplateEngineFactory


Wanze
 Share

Recommended Posts

  • 2 months later...
  • 1 year later...

Hi @markus_blue_tomato ! Just wanted to ask you, I'm trying to throw a 404 on a controller to invalidate some urls but I am getting stuck on getting a 500 error because the exception doesn't get caught, just wondering if you had any experience tackling something like this.

Doing this at the end of the controller:

if($input->urlSegment1) {
   $pageOnSegment = getPageToRender(); 
   $view->set('page', $page);
} else{
   throw new Wire404Exception();
}

 

Link to comment
Share on other sites

22 hours ago, elabx said:

Hi @markus_blue_tomato ! Just wanted to ask you, I'm trying to throw a 404 on a controller to invalidate some urls but I am getting stuck on getting a 500 error because the exception doesn't get caught, just wondering if you had any experience tackling something like this.

Doing this at the end of the controller:


if($input->urlSegment1) {
   $pageOnSegment = getPageToRender(); 
   $view->set('page', $page);
} else{
   throw new Wire404Exception();
}

 

Hm, not yet... Maybe @Wanze has an idea?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...