||Set the default layout for your app by specifying the relative path to the desired layout file from your views folder (i.e.
||The view engine your app will use to compile server-side markup into HTML.|
||The file extension for view files.|
||Default data to be included as view locals every time a server-side view is compiled anywhere in this app.|
- If your app is NOT using
ejs(the default view engine) Sails will function as if the
layoutoption was set to
false. To take advantage of layouts when using a custom view engine like Jade or Handlebars, check out that view engine's documentation to find the appropriate syntax.
Is something missing?
If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails-docs repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.
- Blueprint API
- Command Line Interface
- Response (`res`)
- Waterline (ORM)
- Resourceful PubSub
- Socket Client
We wrote a book!
Get early access to the book
with promotion code: mcneildoc