Added a block inverse register order to test to prove that partial hierarchy matters.

master
Tom Alexander 4 years ago
parent 5e3b71602f
commit 12d8b58961
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

@ -0,0 +1 @@
The block content is from {+inject/}{~n}

@ -0,0 +1,2 @@
{<inject}beta{/inject}
{>"alpha"/}

@ -0,0 +1,4 @@
{"people": [
{"name": "Alice", "item": "cat"},
{"name": "Bob"}
]}

@ -0,0 +1,3 @@
{>"beta"/}
{>"alpha"/}
{<inject}main{/inject}

@ -5,3 +5,5 @@ Blocks appear to be able to be registered in a loop, however, their context is d
Even if the surrounding dust would prevent a section from being rendered, the inline context is still registered, which makes me think inline contexts are parsed out in a single pass regardless of the context.
Inline partials in sub-templates do not seem to bubble up to blocks in the higher templates.
After the inverse register order test it seems that it takes the last inline partial with that name at that level, walking up the tree of partials. So each file will have exactly one value for each block name, consisting of the final inline partial with that name. Then when rendering the block, it will walk up the tree just like the context tree.

Loading…
Cancel
Save