title: How to use dynamic page titles in sails.js >v1.0?
body: <p>For the last few days I was looking for a viable solution in order to optimize html page titles <code>&lt;title&gt;SOME_TITLE&lt;/title&gt;</code> within sails.js layout files, like <code>layout.ejs</code>, that by default use a static page title. <br>
  Obviously, it would be way better to have dynamic page titles, e.g. Dashboard, Shopping Cart, etc... <br>
  Other people were looking for this answer before and got answers for prior sails versions in <a href="https://stackoverflow.com/questions/31148841/how-can-i-set-different-title-values-for-each-template-in-ejs">Solution 1</a>, <a href="https://stackoverflow.com/questions/20267550/what-is-the-proper-way-to-integrate-dynamic-content-into-the-layout-ejs-file-in">Solution 2</a> and <a href="https://stackoverflow.com/questions/18292415/where-is-title-or-app-name-for-sails-js-using-node-js-and-express-js">Solution 3</a>. 
  Unfortunately, none of them seem to be appropriate for the latest version of sails.js (as of this post).
  <br><br>
  <a href="https://stackoverflow.com/questions/31148841/how-can-i-set-different-title-values-for-each-template-in-ejs">Solution 1</a> was leading in the right direction and suggested what I was looking for. But you had to define a <code>title</code> for every controller and pass it into the view. Otherwise you will get </p>
  
  <blockquote>
    <p>title is not defined at eval</p>
  </blockquote>
  
  <p>So how to define a local variable that is accessible in each controller/view by default?</p>