Remove draft status

Hello.
Is there any way to remove the “Draft” status on a Kirby content item? We only need “Public”. That would save us a click.

You can auto-publish pages with a hook, in Kirby v4 it will be a lote more convenient though: Page creation dialogs | Kirby CMS

As of today, I would need a solution in Kirby 3.
Where can I find this hook for automatically publishing a page?
And does this mean that there is no possibility to have only “publish” as status? That means “draft” and “list” are deactivated and “no longer visible”.

No, you cannot deactivate the draft status completely.

As for the hook, see page.create:after | Kirby CMS. There is no built-in-hook for automatically publishing a page, instead, in a page.create:after hook, you would publish the page.

That’s a pity, thank you very much for your help.

What you could try is to hide the draft status via CSS from the dialog.

That was my thought too. I used page.create:after and then a display:none; in the panel for the status button.

Thanks to all.

Ist this correct?

'hooks' => [
    'page.create:after' => function ($page) {
      $page->changeStatus('listed');
    }
  ],

Yes, but keep in mind that publishing will fail if pages have required fields that are not filled in at page creation.

Thank you for the tip! :+1:t2:
But in our case this cannot happen, because the page is of the “type: layout” and does not contain any other fields that would be “requiered”.
This only happens when the layout is filled.