I am using a template as a base, and want it to be aware of some variables set in the page that is using it...
File: template.jade
vars = vars || {some:"variables"}
!!! 5
head
title vars.some
File: page.jade
vars = {some:"things"} //- this does not get used from within template.jade
extends template
I want the compiled page.jade to have a title "things"
I find solution here
pass block with variables
template.jade:
!!!
html
block vars
head
title #{pageTitle} - default www title
body
page.jade
extends template
block vars
- var pageTitle = 'Home'