Including Files
<%- include('partials/navbar.ejs') %>
Include a template with data:
<% include('header', { title: 'My Page' }) %>
<ul>
<% users.forEach(function(user){ %>
<%- include('item', {user: user}); %>
<% }); %>
</ul>
To include a template, needs a file name option, paths are relative
Comments