Support content projection in data-sly-template
- Dominant language
- No language data
- Stars
- 288
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
In Angular and a multitude of other templating languages, it is possible to declare slots where templates can hold injected html, this is known as content projection, it is a method in which layout and content of layout are separated. This means that a template becomes extremely flexible and quick to refactor. I have found a very hacky way to do this currently (not practical in prod).
**The workaround**:
```
${FormInputSlot1 @context="html"}
${FormInputSlot2 @context="html"}
```
**This is less than ideal for several reasons**
• Escaped quotes
• Markup as a string
• Involved setup
• No ability to have slot contents imported from files
**I propose that the functionality could look like this:**
```
creates a slot to inject content
creates a slot to inject content
varient
`
```
I'd love to hear your thoughts.
Contributor guide
Assessment
This issue has not been assessed yet.