Enables underscore templates in express versions 2 and 3.
in your express app.js, for express 3:
app.configure(function () {
app.engine('html', require('uinexpress').__express)
app.set('view engine', 'html')
in your express app.js, for express 2:
app.configure(function () {
app.register('html', require('uinexpress'))
app.set('view engine', 'html')
set default layout
app.set("layout","layout[old]");
set layout from view page
<% _.setLayout("test_layout"); %>
- An alternative is to use ejs in the browser, see the module ejsinbrowser