Support for divider attributes on template includes
Hi, as per my questions on Twitter at the moment I have created sets of partial templates for common UI elements. For example, I have:
- article.html and article_fields.html
- btn.html and btn_fields.html
This means I can include buttons in some articles, have multiple buttons in a repeater on others or no buttons at all. I have also got some custom variables passed through from other data sources that only need the presentational template without requiring fields.
The only problem is that unless there is a field between the two <perch:template> tags I am unable to add a divider to break up the field groups. Adding to a field within a partial won't always work, as in the case of the repeater would result in a duplicate divider name.
Something like this:
<!-- Article with multiple buttons in a repeater --> <perch:template path="../partials/article.html" /> <perch:template path="../partials/btn_row.html" divider-before="Controls" /> <!-- Article with single button called directly --> <perch:template path="../partials/article.html" /> <perch:template path="../partials/btn_fields.html" divider-before="Controls" />