{"action":"opened","issue":{"url":"https://api.github.com/repos/XaminProject/handlebars.php/issues/148","repository_url":"https://api.github.com/repos/XaminProject/handlebars.php","labels_url":"https://api.github.com/repos/XaminProject/handlebars.php/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/XaminProject/handlebars.php/issues/148/comments","events_url":"https://api.github.com/repos/XaminProject/handlebars.php/issues/148/events","html_url":"https://github.com/XaminProject/handlebars.php/issues/148","id":171074789,"number":148,"title":"How to extend Context in custom helper?","user":{"login":"jcubic","id":280241,"avatar_url":"https://avatars.githubusercontent.com/u/280241?v=3","gravatar_id":"","url":"https://api.github.com/users/jcubic","html_url":"https://github.com/jcubic","followers_url":"https://api.github.com/users/jcubic/followers","following_url":"https://api.github.com/users/jcubic/following{/other_user}","gists_url":"https://api.github.com/users/jcubic/gists{/gist_id}","starred_url":"https://api.github.com/users/jcubic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcubic/subscriptions","organizations_url":"https://api.github.com/users/jcubic/orgs","repos_url":"https://api.github.com/users/jcubic/repos","events_url":"https://api.github.com/users/jcubic/events{/privacy}","received_events_url":"https://api.github.com/users/jcubic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-14T19:40:06Z","updated_at":"2016-08-14T19:40:06Z","closed_at":null,"body":"I wan to create custom helper `sql`:\r\n\r\n```html\r\n<ul>\r\n{{#sql SELECT * FROM users}}\r\n   <li>{{username}}</li>\r\n   <ul>\r\n      {{#sql SELECT * from files where user.id = [id]}}\r\n          <li>{{filename}}</li>\r\n      {{/sql}}\r\n    </ul>\r\n{{/sql}}\r\n</ul>\r\n```\r\n\r\nhow can I use Context in custom helper to make it work? Also if I'm in helper and call `$context->get('id');` will it return the id from sql higher in hierarchy? Do I need to modify Helpers.php to add this helper or is there a way to do it outside of the library in user code?"}}
{"actor":{"display_login":"jcubic"}}