Skip to content
Discussion options

You must be logged in to vote

This issue is solved using "inline partials" in Handlebars. Now SQLPage can be like HTML unlimted nesting. One compnent can embed another component. Below one is a htmx powered universal component!

{{#*inline "nested_element"}}
<{{~#if tagName}}{{tagName}}{{else}}div{{/if~}} 
    {{~#if id}} id="{{id}}"{{/if~}}
    {{~#if name}} name="{{name}}"{{/if~}} 
    {{~#if class}} class="{{class}}"{{/if~}}

    {{~#if hx_get}} hx-get="{{hx_get}}"{{/if~}}
    {{~#if hx_post}} hx-post="{{hx_post}}"{{/if~}}
    {{~#if hx_target}} hx-target="{{hx_target}}"{{/if~}}
    {{~#if hx_swap}} hx-swap="{{hx_swap}}"{{/if~}}
    {{~#if hx_trigger}} hx-trigger="{{hx_trigger}}"{{/if~}}
    {{~#if hx_indicator}} hx…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@lovasoa
Comment options

Answer selected by YunusMechery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants