One Pager Part Sorting?

Working with the One-pager guide. Is there a way to make the “parts” (pages?) sortable like a structure field or images?

I saw in the Pages documentation that they appear to be sortable:

This is my blueprint:

  - width: 1/3
      sections:
        parts:
          headline: Content Blocks
          type: pages
          empty: Nothing else to add?
          status: all
          info: "{{ project.intendedTemplate }}"
          image: false
          templates:
            - project-screenshot
            - project-text-row
            - project-image-and-text
            - project-left-image-and-text
            - project-quote

But this is how they look when added to the panel (no sort options on hover):

That’s because they are still drafts, you have to publish them (change status to listed) to make them sortable.

Klick on the three dots and select changeStatus. Note that you can only sort pages that use the default sorting scheme (with numbers prepended to the folders in the file system), not if you sort alphabetically or by date.

See docs: https://getkirby.com/docs/reference/panel/blueprints/page#sorting

1 Like

Of course it’s something that simple. Thank you!

It also just noticed that the control is different in the Documentation sample -> Specifically the “Select” option at the top right. Is it possible to choose a sub page that has been created somewhere else in the panel? o.O

What are you referring to?

The documentation sample has a “Select” option at the top right:
image

My panel is only showing “Add”
image

For a files field? Could you link to the docs page with that example, please?

This documentation sample:

My screenshot is rendered in my panel by the following:

  - width: 1/3
      sections:
        parts:
          headline: Content Blocks
          type: pages
          empty: Nothing else to add?
          status: all
          info: "{{ project.intendedTemplate }}"
          help: You can add as many blocks as you want.
          templates:
            - project-screenshot
            - project-text-row
            - project-image-and-text
            - project-left-image-and-text
            - project-quote

Well, that is a pages section, you can not select anything in a section, only create (add) new pages.

The documentation example is a pages field, in a field you select pages but you can’t add pages.

:open_mouth: Well that’s actually super handy.

Thank you (again)!

Pages section vs. pages field:

Pages section

  • list + create pages
  • only pages from one parent
  • filterable by template + status only

Pages field

  • select one or more pages from a given set of pages
  • IDs of the selected pages are stored in the content file (useful to create references, e.g related pages)
  • can query pages from different parents via query option (does not have a parent property)
  • currently no option to create new pages (but on the roadmap)

There’s also a files section and a files field, the distinction is somewhat similar (but files field already has upload functionality)

3 Likes

This post is exactly what we need to clarify for new users what distinguish pages sections vs. pages fields. I stumbled about this while my research for my other thread too.