Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial Block support #21

Open
jgthms opened this issue Jul 11, 2017 · 1 comment
Open

Partial Block support #21

jgthms opened this issue Jul 11, 2017 · 1 comment

Comments

@jgthms
Copy link

jgthms commented Jul 11, 2017

Hello @aymerick and thanks for your library.

It seems raymond doesn't support partial blocks?

Where you would have 2 files: main.hbs and mypartial.hbs

1. Main Container
{{#> mypartial }}
  2. Hello World
{{/mypartial}}
3. Foo Bar
{{> @partial-block }}

And the output would be:

1. Main Container
3. Foo Bar
2. Hello World

Am I missing something? 🤔

@jgthms
Copy link
Author

jgthms commented Jul 12, 2017

Found a workaround:

main.hbs

1. Main Container
{{> mypartial
  subpartial="other-partial.hbs"
}}

mypartial.hbs

3. Foo Bar
{{> (subpartial) }}

other-partial.hbs

2. Hello World

The output is:

1. Main Container
3. Foo Bar
2. Hello World

Note the dynamic partial (subpartial).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant