Jump to content


Photo

Create pages with only title field, logic


  • Please log in to reply
6 replies to this topic

#1 SiNNuT

SiNNuT

    Sr. Member

  • Members
  • PipPipPipPip
  • 378 posts
  • 236

Posted 01 July 2012 - 11:58 AM

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.

#2 Soma

Soma

    Hero Member

  • Moderators
  • 3,400 posts
  • 1932

  • LocationSH, Switzerland

Posted 01 July 2012 - 12:08 PM

I think I recognized that if a template has no php file it doesn't have the publish behavior. Not sure about others.

@somartist | modules created | support me, flattr my work flattr.com


#3 SiNNuT

SiNNuT

    Sr. Member

  • Members
  • PipPipPipPip
  • 378 posts
  • 236

Posted 01 July 2012 - 01:08 PM

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.

#4 SiNNuT

SiNNuT

    Sr. Member

  • Members
  • PipPipPipPip
  • 378 posts
  • 236

Posted 01 July 2012 - 01:30 PM

hmm, this is also the case for pages that do have a file based template, with only the title field.
So this brings me back to my OP question.

#5 tiagoroldao

tiagoroldao

    Jr. Member

  • Members
  • PipPip
  • 19 posts
  • 5

  • LocationPortugal

Posted 01 July 2012 - 02:16 PM

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)

#6 ryan

ryan

    Hero Member

  • Administrators
  • 5,980 posts
  • 3382

  • LocationAtlanta, GA

Posted 02 July 2012 - 01:06 PM

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.

#7 SiNNuT

SiNNuT

    Sr. Member

  • Members
  • PipPipPipPip
  • 378 posts
  • 236

Posted 02 July 2012 - 01:08 PM

Thx Ryan, makes perfect sense.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users