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

res.view() does not include layout #554

Closed
anissen opened this issue Jul 10, 2013 · 8 comments
Closed

res.view() does not include layout #554

anissen opened this issue Jul 10, 2013 · 8 comments
Milestone

Comments

@anissen
Copy link

anissen commented Jul 10, 2013

If I create a view views/game/test.ejs and go to localhost:1337/game/test then I see the file rendered with layout. However, if I create the following controller:

/*---------------------
    :: Game 
    -> controller
---------------------*/
var GameController = {

  test: function(req, res) {
    return res.view();
  }

};
module.exports = GameController;

... then views/game/test.ejs is rendered without layout. Even adding { layout: 'path-to-layout' } to the view-function does not render the layout.

Using the newest Sails dev. version.

@Zolmeister
Copy link
Member

Confirmed

@dubcanada
Copy link
Contributor

Fixed in #573

@mikermcneil
Copy link
Member

Merged and fixed a few other tangential issues

@mikermcneil
Copy link
Member

This will need to be reexamined to ensure support of jade and other view engines, but for now I'm leaving it to focus on tests.

@jasperkennis
Copy link

I'm on 0.9.3 but I still seem to experience this problem. My route is '/*' : { controller: 'home' } but there's no layout being rendered around the home view anywhere.

@aujkis
Copy link
Member

aujkis commented Jul 24, 2013

@jasperkennis do you use ejs or jade? I'm on jade template engine, and I have same issue.

@jasperkennis
Copy link

No I'm using ejs.

@Secretmapper
Copy link

On sails 0.9.8, and there's still no layout?

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

No branches or pull requests

7 participants