{"action":"created","issue":{"url":"https://api.github.com/repos/ericf/express-handlebars/issues/89","labels_url":"https://api.github.com/repos/ericf/express-handlebars/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/ericf/express-handlebars/issues/89/comments","events_url":"https://api.github.com/repos/ericf/express-handlebars/issues/89/events","html_url":"https://github.com/ericf/express-handlebars/issues/89","id":46654481,"number":89,"title":"Access to `Handlebars.partials` inside global helpers file","user":{"login":"TuxSudo","id":570861,"avatar_url":"https://avatars.githubusercontent.com/u/570861?v=3","gravatar_id":"","url":"https://api.github.com/users/TuxSudo","html_url":"https://github.com/TuxSudo","followers_url":"https://api.github.com/users/TuxSudo/followers","following_url":"https://api.github.com/users/TuxSudo/following{/other_user}","gists_url":"https://api.github.com/users/TuxSudo/gists{/gist_id}","starred_url":"https://api.github.com/users/TuxSudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TuxSudo/subscriptions","organizations_url":"https://api.github.com/users/TuxSudo/orgs","repos_url":"https://api.github.com/users/TuxSudo/repos","events_url":"https://api.github.com/users/TuxSudo/events{/privacy}","received_events_url":"https://api.github.com/users/TuxSudo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ericf/express-handlebars/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/ericf/express-handlebars/labels/support","name":"support","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-10-23T17:55:24Z","updated_at":"2015-02-13T02:35:30Z","closed_at":"2015-02-13T02:35:30Z","body":"We want to be able to render partials from inside helpers. For example, in our global helpers file, when we try something like:\r\n\r\n```\r\nvar Handlebars = require('handlebars');\r\n\r\nmodule.exports = {\r\n    something: function(options) {\r\n        var partial = Handlebars.partials['partial-name'];\r\n              html = partial(options.hash);\r\n        //....... \r\n    }\r\n}\r\n```\r\n\r\nThat partial `partial-name` is not available because `Handlebars.partials` is an empty object `{}`.\r\n\r\nWhat is the best way to create/import/inject the `Handlebars.partials` object (as defined in the `partialsDir` option) so our helpers can instantiate them?\r\n\r\nThanks in advance!"},"comment":{"url":"https://api.github.com/repos/ericf/express-handlebars/issues/comments/74195360","html_url":"https://github.com/ericf/express-handlebars/issues/89#issuecomment-74195360","issue_url":"https://api.github.com/repos/ericf/express-handlebars/issues/89","id":74195360,"user":{"login":"TuxSudo","id":570861,"avatar_url":"https://avatars.githubusercontent.com/u/570861?v=3","gravatar_id":"","url":"https://api.github.com/users/TuxSudo","html_url":"https://github.com/TuxSudo","followers_url":"https://api.github.com/users/TuxSudo/followers","following_url":"https://api.github.com/users/TuxSudo/following{/other_user}","gists_url":"https://api.github.com/users/TuxSudo/gists{/gist_id}","starred_url":"https://api.github.com/users/TuxSudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TuxSudo/subscriptions","organizations_url":"https://api.github.com/users/TuxSudo/orgs","repos_url":"https://api.github.com/users/TuxSudo/repos","events_url":"https://api.github.com/users/TuxSudo/events{/privacy}","received_events_url":"https://api.github.com/users/TuxSudo/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T02:35:30Z","updated_at":"2015-02-13T02:35:30Z","body":"Not particularly, but that's ok. The goal is to allow development of helpers and partials that work both server and clientside. Clientside, handlebars puts partials at `Handlebars.partials`. So, I'd still have to register them globally anyway with the proposed solution. But I will close this and potentially submit a pull request later.  \r\n\r\nThanks for your work on this. :+1: "}}