I am working on a custom ContentListingTile with sorting support. Basically this works, but now I want to make it nicer for the editor with drag and drop support in the tile edit area and this does not work for me currently. I customized the html_result of the querystring widget:
@tomgross you know that the standard content listing tile is getting replaced very soon with the work from @mikkohu right? He will be preparing PR in the next couple of weeks. Have a look at his video.
Hi @djay. Thanks for your answer. Yes I have seen the video and it looks awsome! I am very much looking forward to try this out myself. What I did not see is a sorting option. Is it included? It is what I need.
My version of ContentListingTile has the same sorting as the old one. You can edit it from the modal window and sort list items asc or desc according a search parameter.
If I understood correctly, you want to be able to change sorting in mosaic editor? That propably won't clash with my code too much. However if you do make changes to the list result templates, I don't use them myself. Rather I generate the list template during runtime according the html content defined by user.
I'm not sure if I can help you, but I'd like to make sure we won't have too much merge problems when we do our PR:s. Can you describe me a default use case for your sorting?
What is currently possible is to use sorting based on a sortable index. Which is not sufficient in my case. I have folders with a lot of person objects. I want to display various person lists in different orderings in different contexts. So the editor needs a way to set the ordering on the widget itself. I introducted a new field which handles the ordering. This works from the backend side. Now I want to polish the frontend. Does that make sense?
No worries. I won't interfere with your PRs. Yours have priority
Meanwhile I managed to find a solution for this. After fixing a bug in mockup, which prevented to register callback functions for the sortabla pattern https://github.com/plone/mockup/pull/794 I was able to write a custom mockup patter, which acts as a glue between the querystring and the sortable pattern.
In your use case, is it important that the listing is based on a search query? Or is the query only a tool for searching items for otherwiser static listing? (If the latter, maybe we could have a completely new tile for this?)