title: EJS layouts on express 4.x (migration)
body: <p>I had a testing app running on express 3.x with EJS for the views (instead of jade), I was able to create layouts and use them accordingly. But recently  migrated to express 4.x and all is well except the layouts. It seems that the layouts are not being loaded at properly or at all. </p>
  
  <p>Is there some new module of some sort that needs to be loaded? What am I missing? I tried hard coding the layout onto my res.render parameters and didn't take. I even set a default layout to the app itself.</p>
  
  <p>./views/layouts/layout.ejs (default layout for all views</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
      &lt;html&gt;
        &lt;head&gt;
            &lt;% include partials/head %&gt;
        &lt;/head&gt;
        &lt;body&gt;
          &lt;% include partials/top_sidebar %&gt;
          &lt;%- body %&gt;
        &lt;/body&gt;
  
    &lt;% include partials/footer %&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>./views/partials/top_sidebar.ejs</p>
  
  <pre><code>&lt;a href = "/" &gt;Home&lt;/a&gt;
  &lt;a href = "/about" &gt;About&lt;/a&gt;
  &lt;a href = "/contact" &gt;Contact&lt;/a&gt;
  
  &lt;% if (!isAuthenticated) { %&gt;
      &lt;a href = "/login" &gt;Login&lt;/a&gt;
  &lt;% } else { %&gt;
      &lt;a href = "/user" &gt;Profile&lt;/a&gt;
      &lt;a href = "/" &gt;Jobs&lt;/a&gt;
      &lt;a href = "/logout" &gt;Logout&lt;/a&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>app.js (router call to '/about')</p>
  
  <pre><code>router.get('/about', function(req, res, next){
          res.render('about', { isAuthenticated: false, user: req.user, title: 'About' });
      });
  </code></pre>
  
  <p>./views/about.ejs </p>
  
  <pre><code>&lt;h1&gt;&lt;%= title %&gt;&lt;/h1&gt;
  &lt;p&gt;Something that gives about information.&lt;/p&gt;
  </code></pre>
  
  <p>In this sample code the about view loads without the top_sidebar. Therefore I assume the layout is not loading correctly. Even if I force it doing: <code>res.render('about', { isAuthenticated: false, user: req.user, title: 'About', layout: "./layouts/layout.ejs" });</code></p>