-
Notifications
You must be signed in to change notification settings - Fork 383
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
Partials as an Option #82
Comments
That feature is currently not supported. Right now you must configure the dirs where your partials are up front. Stepping back, what are you trying to accomplish with having a dynamic partial? There might be a different way of accomplishing what you're trying to do. And in the meantime, I'll think through how I could add support for passing in partials to |
I want to figure out how Handlebars behaves when you use |
Eric, I am experimenting. I am trying to figure out which features overlap or if I could hack it :p I am new to handlebars to so there was confusion around other issues I resolved. This was the only problem I couldn't resolve because changing the core handlebars code didn't give me debugging info I was trying to get. I went through the express-handlebars code and I saw everything was populating correctly. In a weird way I am happy that it wasn't me. Thanks again Eric |
The `renderView()` method now accepts render-level `partials` that are merged with the instance-level and global Handlebars partials. The option value is specified as object with the shape: `{partialName: fn}` or a Promise of such an object. Fixes #82
Hi,
Thanks for the great work on express-handlebars.
I'm a little new to Node/Express/Handlebars but I have lots of javascript experience.
I'm trying to experiment and see if I can change a partial when you do a res.render()
My 'Main()' node script
My Router Rule (hello.world):
Is this:
setup to work or am I doing it wrong? It finds the partial 'header' or 'footer' correctly. It seems you can't switch the partial when you flip the 'render'. Maybe its my n00bness to handlebars but I thought you could do pass the partials as an argument or option.
The text was updated successfully, but these errors were encountered: