Seems inline partials do not bubble up to higher templates.
This commit is contained in:
parent
ec0edac607
commit
5e3b71602f
1
js/test_cases/block_register_order/alpha.dust
Normal file
1
js/test_cases/block_register_order/alpha.dust
Normal file
@ -0,0 +1 @@
|
||||
{<inject}alpha{/inject}
|
2
js/test_cases/block_register_order/beta.dust
Normal file
2
js/test_cases/block_register_order/beta.dust
Normal file
@ -0,0 +1,2 @@
|
||||
{<inject}beta{/inject}
|
||||
{>"alpha"/}
|
4
js/test_cases/block_register_order/input1.json
Normal file
4
js/test_cases/block_register_order/input1.json
Normal file
@ -0,0 +1,4 @@
|
||||
{"people": [
|
||||
{"name": "Alice", "item": "cat"},
|
||||
{"name": "Bob"}
|
||||
]}
|
3
js/test_cases/block_register_order/main.dust
Normal file
3
js/test_cases/block_register_order/main.dust
Normal file
@ -0,0 +1,3 @@
|
||||
The block content is from {+inject/}{~n}
|
||||
{>"beta"/}
|
||||
The block content is from {+inject/}{~n}
|
@ -3,3 +3,5 @@ Blocks seem to be rendered with the last inline partial of the same name.
|
||||
Blocks appear to be able to be registered in a loop, however, their context is defined by the context during the call to the block `{+}` as opposed to when their override is defined by an inline partial `{<}`.
|
||||
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user