Jump to content

Create pages with only title field, logic


SiNNuT
 Share

Recommended Posts

When you create a new page, and then save, with let's say the basic-page template the page has the status unpublished.

When i create a new page, and then save, with a template that only has the title field the page goes straight to published status.

Is this by design? If so i'm curious about the reasoning behind this.

Link to comment
Share on other sites

I am indeed working with a file-less template. This makes sense cause it actually gives this info on the template edit page:

"Pages using this template are not viewable because the template file (tt.php) does not exist [no-file]."

So i guess publish/un-publish haas no relevance for file-less template pages.

Link to comment
Share on other sites

Just tried to replicate it, and a page with no fields other than title does indeed start published.. But it doesn't seem to be related with having a template file or not - a page with title and body, with no template file, has a normal publishing behavior (it starts unpublished - that is, both with the "unpublished checkbox checked and the "no template" warning)

Link to comment
Share on other sites

If a page just has a 'title' field and nothing else, then it doesn't go into an intermediate unpublished state. The reason for this has to do with the reason why other pages start in an unpublished state…

Other pages start 'unpublished' because the editor wasn't able to see all the fields at the time they created the page. Obviously it would be premature for that page to enter a published state before the editor had an opportunity to populate it's fields.

Whereas, when the editor creates a page that has nothing other than a 'title' field, they've seen all the fields there are at the time they created the page. The need for a page to go into an intermediate 'unpublished' state is much less likely.

Granted, there are still the rare situations where you may actually want that page to be unpublished, even if you have nothing more than a 'title' (like if you are building the first page in a structure of pages). In such cases, after I create the page I click to the 'settings' tab and check the box for 'unpublished', then save. However, the vast majority of the time that users create title-only pages, the intermediate unpublished step is an annoyance. So the behavior is aimed at reducing annoyance. :) We didn't used to have this behavior, and there was indeed much annoyance with numerous accidental unpublished pages and the like.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...