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

Inline Partials #176

Open
bobbyshaw opened this issue Jul 5, 2022 · 2 comments
Open

Inline Partials #176

bobbyshaw opened this issue Jul 5, 2022 · 2 comments

Comments

@bobbyshaw
Copy link

bobbyshaw commented Jul 5, 2022

In a similar vein to #85, I'd like to request support for inline partials.

The use case is that I would like to define an inline partial within a widget template so that I can refactor my code to avoid duplication.

@jairo-bc
Copy link
Contributor

jairo-bc commented Jul 5, 2022

Hi @bobbyshaw, looks like that issue referring to the fallback partial. That means, it will display inline content, when the partial is not registered.
Have you tried to used, what error could you see?

@bobbyshaw
Copy link
Author

Hi @jairo-bc. Sorry, just noticed I shared the wrong link. Updated. It's not the fallback that I'm looking for but the ability to inline declare a partial (template) that I can then use multiple times and pass parameters to.

Here's a blog post on the topic.

When I added:

{{#*inline "foo"}}bar{{/inline}}
{{> foo }}

I received the error:

The following template(s) are/is missing:
foo

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

No branches or pull requests

2 participants