Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for a default view #6

Open
peters opened this issue Jun 28, 2012 · 1 comment
Open

Support for a default view #6

peters opened this issue Jun 28, 2012 · 1 comment

Comments

@peters
Copy link

peters commented Jun 28, 2012

We have a lot of code that depends on having a default layout rendered depending on the what code module that is loaded. Since express has no concept of layouts anymore, we began looking for alternative implementations since rewriting is not an option, but a drop-in replacement is acceptable to us.

Then i found this great little library, and it will save us x amount of work. But how would one set a default layout, in 2.x we would do it like this:

app.set('view options', {
   layout: __magic_path + '/default_layout.ejs'
});

How can we do that using your middleware? :)

@slaskis
Copy link
Member

slaskis commented Jul 7, 2012

Good catch, this is currently missing but it shouldn't be more than adding app.get('view options').layout to this line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants