{"action":"created","issue":{"url":"https://api.github.com/repos/vert-x3/vertx-web/issues/514","repository_url":"https://api.github.com/repos/vert-x3/vertx-web","labels_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/514/labels{/name}","comments_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/514/comments","events_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/514/events","html_url":"https://github.com/vert-x3/vertx-web/issues/514","id":204449751,"number":514,"title":"HandlebarsTemplateEngine: include/inherit is done wrong","user":{"login":"mrnejc","id":1905477,"avatar_url":"https://avatars1.githubusercontent.com/u/1905477?v=3","gravatar_id":"","url":"https://api.github.com/users/mrnejc","html_url":"https://github.com/mrnejc","followers_url":"https://api.github.com/users/mrnejc/followers","following_url":"https://api.github.com/users/mrnejc/following{/other_user}","gists_url":"https://api.github.com/users/mrnejc/gists{/gist_id}","starred_url":"https://api.github.com/users/mrnejc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrnejc/subscriptions","organizations_url":"https://api.github.com/users/mrnejc/orgs","repos_url":"https://api.github.com/users/mrnejc/repos","events_url":"https://api.github.com/users/mrnejc/events{/privacy}","received_events_url":"https://api.github.com/users/mrnejc/received_events","type":"User","site_admin":false},"labels":[{"id":147749641,"url":"https://api.github.com/repos/vert-x3/vertx-web/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":469301367,"url":"https://api.github.com/repos/vert-x3/vertx-web/labels/Quick%20Win","name":"Quick Win","color":"d7e102","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-01-31T23:00:31Z","updated_at":"2017-03-07T22:41:30Z","closed_at":null,"body":"### Version\r\n\r\n* vert.x core: 3.3.3\r\n* vert.x web: 3.3.3\r\n\r\n### Context\r\n\r\nTemplate files (*.hbs files) are put into _templates_ directory.\r\nWhen including template partial into master template or doing template inheritance the reference to another template must also include _templates_ path. This is wrong.\r\n\r\nPer documentation at [jknack.github.io/handlebars.java](http://jknack.github.io/handlebars.java/reuse.html) including another template in same directory shouldn't require providing paths. See example with _header.hbs_, _footer.hbs_ and _home.hbs_.\r\n\r\n### Do you have a reproducer?\r\n\r\nExample project at https://github.com/mrnejc/vertx-web-handlebars-test. _HandlebarsTest.java_ has main() method, starting server on port 8080. Visiting http://localhost:8080/partial displays rendered template.\r\n\r\nExample has 3 templates in directory _[src/main/resources/templates/](https://github.com/mrnejc/vertx-web-handlebars-test/tree/master/src/main/resources/templates)_.\r\n\r\nThe file _[partial.hbs](https://github.com/mrnejc/vertx-web-handlebars-test/blob/master/src/main/resources/templates/partial.hbs)_ references _[main.hbs](https://github.com/mrnejc/vertx-web-handlebars-test/blob/master/src/main/resources/templates/main.hbs)_ as {{> templates/main }} but it should be {{> main }} only. _main.hbs_ also references _[include.hbs](https://github.com/mrnejc/vertx-web-handlebars-test/blob/master/src/main/resources/templates/include.hbs)_ with {{> templates/include }} but should be {{> include }}.\r\n\r\n### Extra\r\n\r\nI see that Loader is changed in current master, but can't test because project doesn't build for me.\r\n"},"comment":{"url":"https://api.github.com/repos/vert-x3/vertx-web/issues/comments/284884361","html_url":"https://github.com/vert-x3/vertx-web/issues/514#issuecomment-284884361","issue_url":"https://api.github.com/repos/vert-x3/vertx-web/issues/514","id":284884361,"user":{"login":"yunyul","id":8008350,"avatar_url":"https://avatars2.githubusercontent.com/u/8008350?v=3","gravatar_id":"","url":"https://api.github.com/users/yunyul","html_url":"https://github.com/yunyul","followers_url":"https://api.github.com/users/yunyul/followers","following_url":"https://api.github.com/users/yunyul/following{/other_user}","gists_url":"https://api.github.com/users/yunyul/gists{/gist_id}","starred_url":"https://api.github.com/users/yunyul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yunyul/subscriptions","organizations_url":"https://api.github.com/users/yunyul/orgs","repos_url":"https://api.github.com/users/yunyul/repos","events_url":"https://api.github.com/users/yunyul/events{/privacy}","received_events_url":"https://api.github.com/users/yunyul/received_events","type":"User","site_admin":false},"created_at":"2017-03-07T22:41:30Z","updated_at":"2017-03-07T22:41:30Z","body":"The upstream FileTemplateLoader requires an explicit base path: https://github.com/jknack/handlebars.java/blob/1f6c48e606dc1303d1e92a0a0eaa94120eba64fd/handlebars/src/main/java/com/github/jknack/handlebars/io/FileTemplateLoader.java#L42\r\n\r\nWithout breaking the current API, it seems like enforcing one in Vert.x is infeasible.\r\n"}}
{"actor":{"display_login":"yunyul"}}