1

Is it possible to render a partial view in Geddy.js without rendering the entire HTML page layout?

self.respond(model, {layout: false, template: 'app/views/users/_list'});

I've tried to do this with no success. (Although the documentation says: "layout [false]: a flag to not use a layout file")

asdfghjkl
  • 91
  • 2
  • 8

2 Answers2

1

For future reference, you can pass false into the layout, which will not use a layout from file.

http://geddyjs.org/documentation#controllers.respond

Ryan Gibbons
  • 3,511
  • 31
  • 32
0

Okay. I finally made an "empty" layout called empty.html.ejs:

<%- yield(); %>

Then I used it like this, in the appropriate controller action:

..., {layout: 'app/views/layouts/empty', ...

It seems to be a hack, but at least it is a working solution...

asdfghjkl
  • 91
  • 2
  • 8