Instead of =, you can use # {variable_name}. Here is an example of how I use it: This will make a page with a menu for navigation. Passing the page title each time the page loads, of course, you will need to create an app.get function for each page.
App.js
var navigation = { home : { uri : "/", url : "index", title : "Home" }, lab : { uri : "/lab", url : "lab", title : "Lab" }, profile : { uri : "/profile", url : "profile", title : "Profile" }, timetable : { uri : "/timetable", url : "timetable", title : "Timetable" } } app.get(navigation.profile.uri, function(req, res){
profile.jade
section#page-content h1
layout.jade
!!! 5 html head title= title link(rel='stylesheet', href='/stylesheets/reset.css') link(rel='stylesheet', href='/stylesheets/style.css') body header#site-header nav#site-navigation != partial("partials/navigation") section!= body footer#page-footer
Jack
source share