Keeping the 'Add' button in pages section?

Hello,
I would like to keep the ‘Add’ button in a pages section so that users can easily create a new ‘article’. I need the pages section to only show the currently published articles. When I use ‘status: published’ in the blueprint, the add button disappears? Also, ‘status: published’ is still returning unlisted articles whereas ‘draft’ or ‘unlisted’ return as expected?

Here’s my current blueprint:

Title: Design and Manufacture

columns:
  - width: 1/2
    sections:
      hero:
        type: fields
        fields:
          Hero:
            label: Hero
            type: blocks
            max: 3
            fieldsets:
              - image
              - heading
              - text    
      intro:
        type: fields
        fields:
          Intro:
            label: Section Introduction
            type: object
            fields:
                headline:
                    type: text
                introText:
                    type: textarea
                    buttons:
                      - bold
                      - italic
  - width: 1/2
    sections:
      pages:
        type: pages
        label: Live Services
        layout: cards
        status: published

Any advice?

Many thanks

Published = listed and unlisted

The Add button is only available, if your section allows drafts.

Thank you. Is there anyway to override this? My scenario is that ‘Design and Manufacture’ is a landing page with it’s own fields and content. I want to list only the published ‘sub pages’ of this landing page so the user can access and edit, but also Add new ‘pages’. My plan is to list drafts and unlisted separately so the user has a complete overview of the ‘Design and Manufacture’ section of their website.

Why don’t you create a second section for drafts/unlisted? You need to show these somewhere so they are still accessible?

You mean like below? This still doesn’t give me an add button above published and also shows both published and unlisted (see comments in the code)?

Title: Design and Manufacture

columns:
  - width: 1/2
    sections:
      hero:
        type: fields
        fields:
          Hero:
            label: Hero
            type: blocks
            max: 3
            fieldsets:
              - image
              - heading
              - text    
      intro:
        type: fields
        fields:
          Intro:
            label: Section Introduction
            type: object
            fields:
                headline:
                    type: text
                introText:
                    type: textarea
                    buttons:
                      - bold
                      - italic
      Live:
        type: pages
        label: Live Services
        layout: cards
        # Still no ADD button
        status: published #still shows both published and unlisted
  - width: 1/2
    sections:
      Unlisted:
        type: pages
        label: Unpublished
        status: unlisted
      Draft:
        type: pages
        label: Still in Draft
        template: service
        status: draft

Yes, see above, published = listed and unlisted

Ah! My mistake (i’m new), I didn’t realise there was a ‘listed’ status! Still no Add button above ‘listed’ though?

With this setup it wouldn’t make sense for there to be an “Add” button above a field showing “listed” pages, as new pages are initially created with “draft” status, so if a user used the “Add” button to create a new page, it wouldn’t appear in that section unless they immediately changed the status to “listed” (“Public”).

However, new in Kirby 4 is the ability to specify the default status for new pages.

So you might then think that if you set a page type to default to “listed”, that an “Add” button would then appear above the “listed” pages field, but this doesn’t appear to be the case. I’ve left a comment on a related feature request for this: https://kirby.nolt.io/181

1 Like