Is there no way of sorting documents by dragging into place in the CMS, as happens with wordpress? Currently the only way I can see of doing a specific order is by adding an order field, and manually putting a number in, but this leaves the possibility of duplicate numbers, and is really un-user friendly for authors/writers etc.. Any plans to add this feature?
Hi @berman.oj,
Welcome to the Prismic community, and thanks for posting this question!
I have some experience with WordPress, but I've never seen drag-and-drop ordering. In my experience, WordPress posts are most-often ordered by date. Are you using a plugin like this?
Instead of a number, you could use a date field — similar to classic WordPress — which would be more user-friendly. That way, users know that if they set the date to today, then the post will show up at the top of the list.
However, the more standard way to do this in Prismic would be by modeling a page with a Group field or Slices. Here's how you would do that:
Say you have a homepage with a list of featured posts. Rather than querying the API for a list of 10 posts and displaying them in a list, you would create a Slice on the Homepage Custom Type called "Featured Post Slice". The Featured Post Slice would have a Content Relationship Field allowing editors to link to a post. Then editors could curate a list of featured posts on the homepage with Slices. You could also add other Slices, like "Testimonial" or "Ad."
However, I recognize that I might not have addressed your specific use case. If so, can you describe your project in more detail, to help me understand?
Thanks,
Sam
Thanks for your reply. OK I will look into these solutions.
This particular use case is a list of client logos, so a date field seems unnatural. I guess the content relationship is the way to go here.
@berman.oj Sounds good! If it's just a list of logos, could you simple use a Group field with an Image field inside?
Sam
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.