Querying a page field (in a blueprint) prevents changing position by drag & drop?

Here’s the blueprint for a projects page (panel screenshot below):

title: Projects
image:
  back: black
  query: false
  icon: palette

columns:
  left:
    width: 3/4
    sections:
      drafts:
        type: pages
        label: Drafts
        status: draft
        template: project
      published:
        type: pages
        label: Published projects
        status: listed
        layout: cards
        size: small
        template: project
        image:
          ratio: 14/9
          cover: true
  right:
    width: 1/4
    sections:
      projectsSlider:
        label: Slider projects
        type: pages
        query: site.find('Projects').children.filterBy('priority', 'slider')
        image:
          cover: true
      projectsPriority1:
        label: Projects, priority 1
        type: pages
        query: site.find('Projects').children.filterBy('priority', 1)
        image:
          cover: true
      projectsPriority2:
        label: Projects, priority 2
        type: pages
        query: site.find('Projects').children.filterBy('priority', 2)
        image:
          cover: true

In the panel, on the left, all published projects. On the right, a smaller view of all published projects, grouped in sections by some parameter.

I can sort the projects using the fancy drag & drop method on the left column (where they’re all indiscriminately displayed), and the changes in order will echo to the right column where they’re grouped by filter. But I cannot do it the other way.

This seems to come from the fact that the right side pages are queried/filtered.
Yet, I can click “change status” then choose a new position “manually” from that same right-side column. Which, as far as I understand, works the same but is just a bit more tedious ?

Is there a way I can make the drag-&-drop-changing-of-position thing work both ways ?

You are right. Using a query for a pages or files section disables the drag-and-drop sorting. There is no way around that as a query could also return results from completely different collections (e.g. pages in two different page trees). There would be no way to sort them in one list. I get that in your use case, automatic drag-and-drop sorting would be possible, but there is unfortunately no reliable way for Kirby to detect that this is the case.

1 Like