To reference the partial page views/partials/some-partial.ejs
from a page in views/pages
in ejs, use the include
function as so:
<p> Here is some HTML </p>
<%- include('../partials/some-partial.ejs') %>
<p> Here is some HTML </p>
This will replace <%- include('../partials/some-partial.ejs') %>
with whatever code is in views/partials/some-partial.ejs
.
For more information on working with ejs
, click here.
For information on what the various distributed partials do, view this tutorial.