Well, actually a page is always created as an invisible page and only gets visible after changing this status (publishing it). In your templates you would need to use $pages->visible() instead of just $pages however.
Yes, we can use $pages->visible()… but the page remains accessible via its url (see doc “Invisible pages are still accessible via their URL”). It is not a draft but just an exclusion from menu, if I’m not mistaken.
In addition to this, if I use $pages->visible(), the page doesn’t get visible after “publishing it” (at least on our side) but only, logically enough, after drag-and-dropping it in the visible section.
No big issue there for us but still wondering if a draft feature…
With “publishing” I was referring to the new toggle from the 2.1 beta - an alternative to the drag and drop.
But true, what I have done in one project, where I wanted to make sure blogposts can’t be accessed at all before being “visible”: Added some code in the controller of my article template, which would refer the visitor to the error page if the page/article is invisible or the date field is still in the future.
With the new version of Kirby, there is a new button in the panel, where you can switch from invisible to visible. You can also use a separate draft field and prevent access to those pages:
If you’re feeling very clever it would be sensible to do a user check alongside the visible check, in order to allow editors to still preview the page…