Skip to content
This repository was archived by the owner on Mar 20, 2021. It is now read-only.

CollectionView: Support for header and footer #402

Open
MichaReiser opened this issue Dec 1, 2014 · 1 comment
Open

CollectionView: Support for header and footer #402

MichaReiser opened this issue Dec 1, 2014 · 1 comment
Milestone

Comments

@MichaReiser
Copy link
Contributor

If the collection helper is used to render e.g. an ul, then it's hard to add a header and footer (need to use appendItem). It would be nice if this common case would be possible from the handlebars template.

{{#collection ... tagName="ul"}}
    <li class="header">...</li>
    {{collection-element}}
    <li class="footer">..</li>
{{/collection}}

Instead of inserting a new Wrapper-Element in the collection-element helper, it should append it to the parents element (maybe another helper name should be used).

This change would require to rewrite the update mechanism in the CollectionView (which first removes all content from the collection.el and then renders the items.

@kpdecker kpdecker added this to the 3.1 milestone Jan 3, 2015
@jasonwebster
Copy link

In the mean time, it's possible to achieve this by subclassing CollectionView and using that (including {{collection-element}} and your other content in its template, instead of using the {{collection}} helper.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants