diff --git a/active/0000-multiple-yields.md b/active/0000-multiple-yields.md new file mode 100644 index 0000000000..d84ac81970 --- /dev/null +++ b/active/0000-multiple-yields.md @@ -0,0 +1,64 @@ +- Start Date: 2015-04-01 +- RFC PR: (leave this empty) +- Ember Issue: (leave this empty) + +# Summary + +Allow templates to have multiple `{{yield}}`'s. + +# Motivation + +Today components and layouts are limited to a single `{{yield}}` which makes it difficult to deal with even slightly complex layouts and components. + +# Detailed design + +```hbs +{{!-- templates/components/my-component --}} +
+
+ {{yield}} +
+ + {{#has-content-for "footer"}} + + {{/has-content-for}} +
+``` + +```hbs +{{!-- templates/index.hbs --}} +{{#my-component}} +

Here is some body text

+ + {{#content-for "footer"}} +

Here is some footer text

+ {{/content-for}} +{{/my-component}} +``` + +```html + +
+
+

Here is some body text

+
+ + +
+``` + +# Drawbacks + +N/A + +# Alternatives + +@stefanpenner mentioned some ideas he had, I'll let him explain them. + +# Unresolved questions + +N/A