maxtaco/pubjs — Issue #2: Variables not available in included files
Author: capndesign
Created: 2011-12-19 15:47:45+00:00
State: open

I'm using ExpressJS to include a template fragment with their `partials` command. I'd like to be able to pass the value of a variable to the included template.

For example: I have a search box that is the same across all pages. On the search page, I want to pre-populate search terms from the querystring. I don't want this on other pages. The variable output (`%{searchVal}`) has to live in the included search-box.pjs file, while the code for defining the value lives in its parent document.