Documentation

Light-weight, fast, simple and powerful!
 
Translations of this page?:

Page Status Definitions

Introduction

Wolf assigns one of four different “status” levels to pages; each status named below also has a corresponding numerical value. Note these two examples:

(1) This returns the numerical value corresponding to the page status:

echo $this->status_id;

(2) The name can be used when testing for a particular status:

if ($this->status_id == Page::STATUS_PUBLISHED) { echo 'PUBLISHED'; }

This is the equivalent of this code (which produces the same result):

if ($this->status_id == 100) { echo 'PUBLISHED'; }

N.b.: status_id does not take a parameter, and has no ”()” ending.

Draft

Constant: Page::STATUS_DRAFT

The “draft” status is for use during the early stages of producing a page, before it is ready for display on the frontend of the website.

  • it will NOT be listed by: $this->children()
  • it will NOT be found by: $this->find('its_uri')
  • it is NOT possible to access the page directly with its full url
  • $this->status_id would return a value of 1 (but note draft pages do not appear on the front end!)

Preview

Constant: Page::STATUS_PREVIEW

This status allows content editors to view a page “live” before publishing it; it can only be accessed by full URL (or the “View this page” link while editing in the backend) by a content editor who is logged in to Wolf.

  • it will NOT be listed by $this->children()
  • it will NOT be found by $this->find('its_uri')
  • it is possible to access it directly with its full url ONLY IF logged in with the role of administrator, developer, or editor
  • $this->status_id returns a value of 10

Published

Constant: Page::STATUS_PUBLISHED

Once “published”, a page is viewable on the frontend by any visitor to the website.

  • it will be listed by $this->children()
  • it will be found by $this->find('its_uri')
  • it is possible to access it directly with its full url
  • $this->status_id returns a value of 100

Hidden

Constant: Page::STATUS_HIDDEN

Use this status when you have written a page that you do not want to appear in your site's navigation (e.g., RSS, Sitemap, etc.).

  • it will NOT be listed by $this->children()
  • it will be found by $this->find('its_uri')
  • it is possible to access it directly with its full url
  • $this->status_id returns a value of 101

Note: A “hidden” page can be listed with $this->children(array(), array(), true), because children() can include hidden pages if the 3rd param is set to “true”.

Reviewed

The “Reviewed” page status is deprecated and no longer available in Wolf versions > 0.6.0.

 
functions/page_status.txt · Last modified: 2013-07-28 20:29 by anton-tsyganenko
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
Copyright 2010 wolfcms.org / design by yello studio / Wolf CMS Inside