Hi,
does Wagtail provide a mechanism to make Snippets orderable in the admin (using a similar UI to what's used to reorder pages)?
I realize snippets aren't necessarily intended to be orderable, but I have a use case where it actually would be useful to provide a UI to let the admin control the sort order of snippets (exposing the sort _order as an editable field on the snippet model would be a cumbersome way to have the admin control the overall ordering).
For example, suppose I have a Category snippet (some page types in my app can be associated with a Category), and part of the public-facing site will need to display a list of these categories (manually ordered, as opposed to alphabetically or something). I would envision implementing something along these lines:
@register_snippet
class Category(Orderable):
name = models.CharField(max_length=255)
panels = [
FieldPanel('name')
]
class CustomPage(Page):
category = models.ForeignKey(Category, related_name='pages')
CustomPage.content_panels = Page.content_panels + [
SnippetChooserPanel('category', Category)
]
Is it possible to incorporate the ordering UI into the snippet listing UI in the Wagtail admin? Or...am I approaching this whole thing wrong?
thanks,
Lev