You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable scenarios where content can be inserted into a a partial template as child content, alongside existing functionality that supports arguments and parameters.
Declaring zones in a partial template
A partial template could define a zone for child content, using the < character to indicate "insert content into this zone, named children:
<div>
{{<children}}
</div>
You could potentially define multiple zones, maybe as a result of a conditional value
The current syntax to include a partial template is:
<div>
{{>partial}}
</div>
To make it simple for the parser, extending the # block syntax might be the better way, so perhaps:
{{#>partial}}
<!-- content here.
{{/partial}}
For a partial that supports only one zone, which could be implicitly named children:
{{#>partial}}
My nested content here
{{/partial}}
For a partial that supports multiple zones:
{{#>partial hasData=someTruthyOrFalseyValue}}
{{>has_content}}
We have content!
{{/has_content}}
{{>no_content}}
We have no content
{{/no_content}}
{{/partial}}
Enable scenarios where content can be inserted into a a partial template as child content, alongside existing functionality that supports arguments and parameters.
Declaring zones in a partial template
A partial template could define a zone for child content, using the
<
character to indicate "insert content into this zone, namedchildren
:You could potentially define multiple zones, maybe as a result of a conditional value
Adding a partial template with child content
The current syntax to include a partial template is:
To make it simple for the parser, extending the
#
block syntax might be the better way, so perhaps:For a partial that supports only one zone, which could be implicitly named
children
:For a partial that supports multiple zones:
Use cases:
Layout-type partials:
Re-usable component-type partials:
Partial templates like this would still support passing in arguments, or maps:
For child zones, a single
>
tag would be used, but only supported as a direct child of a partial with nested content?Also, should these be named block partials? components? zoned-partials?
The text was updated successfully, but these errors were encountered: