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

Qute: user-defined tags should allow insert's like include does #22657

Closed
Mai-Lapyst opened this issue Jan 5, 2022 · 2 comments · Fixed by #25531
Closed

Qute: user-defined tags should allow insert's like include does #22657

Mai-Lapyst opened this issue Jan 5, 2022 · 2 comments · Fixed by #25531
Labels
area/qute The template engine kind/enhancement New feature or request
Milestone

Comments

@Mai-Lapyst
Copy link

Description

Tags are currently documented as "can be used to include a template and optionally pass some parameters" (https://quarkus.io/guides/qute-reference#user_tags).

But inside a (user-defined) tag, you cannot use insert to embed nested sections/tags, to for example allow the following:

{#mylist name="My List"}
  {#header}<p>Some more informations</p>{/header}
  {#footer}<button>Add Element</button>{/footer}
{/mylist}
{! mylist tag !}
<div>
  <h1>{name}</h1>
  {#insert header}
  <ul>...</ul>
  {#insert footer}
</div>

I know that there is {nested-content}, but this only allows for the complete body to be used, not single tags from it like insert does when include-ing.

Implementation ideas

No response

@Mai-Lapyst Mai-Lapyst added the kind/enhancement New feature or request label Jan 5, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 5, 2022

/cc @mkouba

@quarkus-bot quarkus-bot bot added the area/qute The template engine label Jan 5, 2022
@mkouba
Copy link
Contributor

mkouba commented Jan 6, 2022

Well, tags were not meant to be used for template inheritance but we can definitely consider adding this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qute The template engine kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants