Skip to content

Tradeoffs between handlebars partials and get helper stink #10

@mkantor

Description

@mkantor

Currently the get helper and handlebars partial syntax ({{> blah}}) serve similar purposes (including content from other files), but they don't fully overlap:

  • Both can embed content from other templates.
  • The get helper can also embed content from executables or static files, but partials can't.
  • Handlebars partials can pass parameters and/or a block to included templates, but get can't.
  • get is passed a route, but partial syntax uses filesystem paths ({{get "/foo/bar"}} vs {{> foo/bar.html.hbs}}).
  • Handlebars partials have the concept of an "inline partial", and there's no analogue for get.

This is confusing and annoying. It would be great to eliminate these tradeoffs so that you don't need to think about when to use each one, either by combining them or making one a superset of the other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions