Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

RFC Forward references for fragments #1

Closed
katallaxie opened this issue Aug 4, 2021 · 0 comments
Closed

RFC Forward references for fragments #1

katallaxie opened this issue Aug 4, 2021 · 0 comments

Comments

@katallaxie
Copy link
Contributor

katallaxie commented Aug 4, 2021

Allow <fragment /> to have reference for future content. <fragment id="12345" /> and <fragment ref="12345" /> allows to preload data and inject in templates. Replacing inner context from outer context by referencing fragments.

template.html

<!-- Layout -->
<fragment src="layout.html">
   <!-- Content -->
   <fragment id="content" src="content.html" />
</fragment>

layout.html

<div>
   <fragment ref="content" />
</div>

content.html

<ul>
  <li>1</li>
</ul>

Fetching parallel and replacement to final output 👇 .

<!-- Layout -->
<div>
  <!-- Content -->
   <ul>
      <li>1</li>
   </ul>
</div>
@katallaxie katallaxie changed the title Replacement order RFC Parallel loading of reference fragments. Aug 4, 2021
@katallaxie katallaxie changed the title RFC Parallel loading of reference fragments. RFC Fragment references Aug 4, 2021
@katallaxie katallaxie changed the title RFC Fragment references RFC Forward references for fragments Aug 4, 2021
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant