Hello,
how can I set the default status of a new page or content to “listed” instead of “draft”?
I’m using Kirby 3.
Thanks
Hello,
how can I set the default status of a new page or content to “listed” instead of “draft”?
I’m using Kirby 3.
Thanks
A new page is always created as a draft, there is no option to make it listed by default.
However, you could use a page.create:after
or page.update:after
hook to auto-publish a page.
Note that a listed page is publicly accessible.
Thanks! I’ll do it with the hook.
Basically like this:
'hooks' => [
'page.create:after' => function ($page) {
$page->publish();
}
]
This will give you an unlisted page. You can also use $page->changeStatus()
to change the status to listed, unlisted (or draft).