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

Register partials on Handlebars global #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edorsey
Copy link

@edorsey edorsey commented Jul 28, 2015

This PR registers the partials on the Handlebars global. This makes it possible to use the handlebars-layouts module instead of using the layouts built into this module. In my opinion theexpress-layouts has some nice features that make it generally a more full-featured layout implementation - fairly equivalent to jade layouts.

I added a development flag that can be passed in. All this flag does is tell re-register the partials on every render. Turning this on makes it so that you can change one of the partials that makes up the layout and the change appears on the next render without having to restart the server.

I'm not sure that this change is even desired, but I implemented it and plan on using it on a few projects, so I figured I'd at least submit a PR. I can update the Read Me, etc if you do want to incorporate these changes.

@boushley
Copy link

I use a helper that renders a dynamic partial specified in context. This change enables that to function properly without needing to manually register partials.

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

Successfully merging this pull request may close these issues.

3 participants