npm.io
0.1.1 • Published 11 years ago

multi-views

Licence
MIT
Version
0.1.1
Deps
1
Vulns
0
Weekly
0
Stars
2

Build Status

This module adds support for rendering views from multiple directories. To use the module, do the following.

var express = require('express');
var multiViews = require('multi-views');

var app = express();

multiViews.setupMultiViews(app);

app.set('views',['views1']);

// later in your code

var viewDirs = app.get('views');
viewDirs.push('views2');

View is searched in each of the view directories and is served from the first directory that it is found. If you would like to override view from a plugin, you can unshift your directory to the views array and it will be looked up from that directory.