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

Issue with underscore partials and vision #67

Closed
molekilla opened this issue Nov 5, 2015 · 6 comments
Closed

Issue with underscore partials and vision #67

molekilla opened this issue Nov 5, 2015 · 6 comments
Assignees
Labels
bug
Milestone

Comments

@molekilla
Copy link

@molekilla molekilla commented Nov 5, 2015

Getting


Debug: internal, implementation, error 
    Error: settings.layoutKeyword conflict
...

with

module.exports = function(templ, options) {

  return function(ctx, options) {
    return require('underscore').template(templ)(ctx || null);
  };

};

module.exports = {
    engines: {
      'html': {
        compile: require('./underscore_compiler')
      }
    },
    compileMode: 'sync',
    path: __dirname + '/../../views',
    partialsPath: __dirname + '/../../views/partials'
};



it breaks when it tries to load the partial

similar code found here
molekilla/rutha@05c7b86

any idea ?

thanks

@jagoda jagoda added the question label Nov 5, 2015
@jagoda

This comment has been minimized.

Copy link
Contributor

@jagoda jagoda commented Nov 5, 2015

The error message you mentioned typically happens when the context object provided has an attribute with the same name as the layout attribute. By default the layout attribute is called content. The layout attribute name can be configured with the layoutKeyword option. Does this help?

@molekilla

This comment has been minimized.

Copy link
Author

@molekilla molekilla commented Nov 5, 2015

probly ... will try

@molekilla

This comment has been minimized.

Copy link
Author

@molekilla molekilla commented Nov 6, 2015

fixed, closing.

@molekilla molekilla closed this Nov 6, 2015
@jagoda

This comment has been minimized.

Copy link
Contributor

@jagoda jagoda commented Nov 6, 2015

Glad this helped. Out of curiosity, are you using layouts at all?

@molekilla

This comment has been minimized.

Copy link
Author

@molekilla molekilla commented Nov 6, 2015

No, pls guide me, refactoring a huge app right now, it will be helpful.
Thanks

On Fri, Nov 6, 2015, 8:22 AM Jeffrey Jagoda notifications@github.com
wrote:

Glad this helped. Out of curiosity, are you using layouts at all?


Reply to this email directly or view it on GitHub
#67 (comment).

@jagoda

This comment has been minimized.

Copy link
Contributor

@jagoda jagoda commented Nov 6, 2015

There's some info on how to use layouts in the hapi tutorials. There are also some code examples for layouts with handlebars in the examples directory. I think the ideas should translate to your situation pretty well.

Since you aren't currently using layouts, I think I'd like to re-open this as a bug. I don't think it makes sense for a user to see a 'layoutKeyword conflict' if layouts aren't being used.

@jagoda jagoda reopened this Nov 6, 2015
@jagoda jagoda added bug and removed question labels Nov 6, 2015
@jagoda jagoda closed this in cf7e9af Nov 9, 2015
@jagoda jagoda self-assigned this Nov 9, 2015
@jagoda jagoda added this to the 4.0.1 milestone Nov 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.