title: Slim 3 - How to add 404 Template?
body: <p>In Slim 2, I can over write the default 404 page easily,</p>
  
  <pre><code>// @ref: http://help.slimframework.com/discussions/problems/4400-templatespath-doesnt-change
  $app-&gt;notFound(function () use ($app) {
      $view = $app-&gt;view();
      $view-&gt;setTemplatesDirectory('./public/template/');
      $app-&gt;render('404.html');
  });
  </code></pre>
  
  <p>But in Slim 3,</p>
  
  <pre><code>// ref: http://www.slimframework.com/docs/handlers/not-found.html
  //Override the default Not Found Handler
  $container['notFoundHandler'] = function ($c) {
      return function ($request, $response) use ($c) {
          return $c['response']
              -&gt;withStatus(404)
              -&gt;withHeader('Content-Type', 'text/html')
              -&gt;write('Page not found');
      };
  };
  </code></pre>
  
  <p>How can I add my 404 template ('404.html') in?</p>