node.js - Using a global wrapper template in Express/Jade -
i've had quick skim of jade documentation , can't seem figure out how apply wrapper templates output.
how done?
it sounds want template inheritance:
// layout.jade !!!5 html body block content the content block define in templates going inherit layout template:
// index.jade extends layout block content h1 hello world! when render index.jade, result:
<!doctype html> <html> <body> <h1>hello world!</h1> </body> </html> so in layout.jade, set common elements js/css, headers/footers, etc.
Comments
Post a Comment