title: res is not defined in ejs
body: <p>Objective: I need to display different templates based on route. In my case it's /edit /new, and I need a condition to display tabs or something else. </p>
  
  <p>In my <code>router.get('/edit' cb)</code> I tested this: <code>res.url.includes('new')</code> which returned true. I went inside my header.ejs and ran a condition: </p>
  
  <pre><code>&lt;% if(res.url.includes('new')) { %&gt;
    &lt;h1&gt;Something else&lt;/h1&gt;
  &lt;% } else { %&gt;
    &lt;h1&gt;This&lt;/h1&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>However, it's telling me that <em>res is not defined</em>. My question is this: whats the best way to do this? My first instinct is to just create another header file but that's going to duplicate a lot of code but I may be over optimizing it.</p>