doT icon indicating copy to clipboard operation
doT copied to clipboard

Undefined using {{#def.

Open gahula opened this issue 11 years ago • 1 comments

var doT = require("dot").process({path: './views'});

app.engine('html', consolidate.dot); app.set('view engine', 'html'); app.set('views', __dirname + '/views');

/render html res.render('map/index-view.html', context);

//folder hierarchy views ---map -------index-view.html (has {{#def.nav #}} inside) ---people ---places layout.def (has {{##def.nav:TEST #}} inside)

//Error received getting undefined when {{#def.nav #}} is called inside index-view.html

gahula avatar Jun 29 '15 01:06 gahula

@gahula you can use doT.process without consolidate.dot, it won't work like this (you are not using doT variable as you can see). Also I need to check if doT.process supports subfolders, I don't think it does. You can use express-dot instead.

epoberezkin avatar Oct 30 '16 22:10 epoberezkin