title: DRYing up layout locals in expressjs rendering
body: <p>I am using express in nodejs, and am trying to keep my view rendering dry.  Inside my layout, I have something like the following (I'm using jade)</p>
  
  <pre><code>body
    nav.login
      -if(currentUser)
        ="logged in information"
      -else
        ="logged out information"
    !=body
  </code></pre>
  
  <p>The problem is that every time I render, I'm now required to have</p>
  
  <pre><code>res.render('anything.jade',{
    locals: {
      currentUser: req.session.currentUser,
      /*all of my other locals*/
    }
  });
  </code></pre>
  
  <p>It seems like a pain to have to go through all of my rendering calls and add that, and then do the same thing if I have to add any other locals to the layout.  Is there some way to keep from having to retype 'currentUser' into the locals everywhere I render</p>