Tuesday 15 February 2011

Using node with express and handlebars, how to change res.render layout path -


I can not find a way to change the path for the layout.

  _config .viewsFolder = __dirname + '/ view /'; Var layout = _config.viewsFolder + 'layout'; Res.render (_config.viewsFolder + Template, {data: data, layout: layout});   

The path is okey:

  / users / users / documents / work / nozz / anode_module / notices / admin / view / layout  < / Pre> 

, but when I try to use it for layout, it looks a few basic paths:

  Express 500 error: ENOENT, open '/ users / user / Documents /   

How can I change the path of this default beginning / how to do / how can I / work / noise / view / user / user / ten Document / work / noah / node_module / nof / admin / layout:

  '/ user / user / document / work / noah / view /'    

No comments:

Post a Comment