Skip to content

Ordering capabilities for collections #1282

Open
@tordans

Description

@tordans

It would be great to be able to order collections.

The way this could work is: When I add a orderField to my collection, the collection index page shows not only the slugField but also the orderField and allows to drag and drop the order which then updates the data of all relevant content/data files.

Something like this…

export const keystaticHomepageFactsConfig = collection({
  label: 'Homepage Fakten-Boxen',
  path: 'src/content/homepageFacts/*',
  slugField: 'fact',
+  orderField: 'position',
  schema: {
    position: fields.number({ label: 'Reihenfolge', validation: { isRequired: true } }),
    fact: fields.slug({ name: { label: 'Fakt' } }),
    factSubline: fields.text({ label: 'Untertitel', validation: { isRequired: true } }),
    description: fields.text({
      label: 'Untertitel',
      multiline: true,
      validation: { isRequired: true },
    }),
  },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions