question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inline partials are not working

See original GitHub issue

I am trying to use inline partials:

{{ #*inline "address" }}
    {{ fullName }}
    {{ #if company }}
        {{ company }}
    {{ /if }}

    {{ address1 }}

    {{ #if address2 }}
        {{ address2 }}
    {{ /if }}

    {{ city }},

    {{ #if province }}
        {{ province }},
    {{ /if }}

    {{ country }}
    {{ postalCode }}
    {{ phone }}
{{ /inline }}

Then:

{{ #with order.billingAddress }}
    {{ #> address }}
{{ /with }}

However, I am getting the following error:

Template references a helper that is not registered. Could not find helper '#*inline'

You can find documentation for inline partials in Handlebar.js documentation.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jokincommented, Nov 15, 2017

#221 adds support to inline partials.

1reaction
huysentruitwcommented, Dec 7, 2017

Can we close this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Doesn't work with inline partials · Issue #106
It seems to be working if I invoke the inline partial as a partial block. src/templates/partials/wrapper.hbs. <h2> {{#> MyInlinePartial }} {{!-- ...
Read more >
Partials
Partials are normal Handlebars templates that may be called ... Subexpressions do not resolve variables so whichPartial must be a function.
Read more >
Handlebars dynamic inline partial - javascript
The template function has no way of knowing what the object's name was: template(inputData){ // This function wouldn't know that inputData.
Read more >
Mysterious problem with nested (inline) partials - #4 by bep
I built one prototype based on blocks but had to abandon that approach as it did not allow overriding blocks from the Child...
Read more >
Using Inline Partials and Decorators with Handlebars 4.0
Inline Partials are defined inside your templates, in Handlebars syntax. There is no JavaScript required to register them. You just declare a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found