node.js - How to use partials in Express.js layout? -


i have layout.ejs file contains site's basic boilerplate html markup: doctype declaration, head, body, footer, basics...

how go placing navigation in separate partial file , including layout? there particular require() or include() function doing this?

i using ejs view engine.

yes.

<% include path/to/template %> 

documentation here. https://github.com/visionmedia/ejs#includes


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -