General
Getting & Giving Support
Administration
Design
- Tut. - Layouts and Themes
- Tut. - Navigation cookbook
- Tut. - How To section
Reference Material
Plugin Development
- Tut. - Writing a plugin
- Ref. - List of Events
- Ref. - Enabling cron jobs
- Ref. - PHPDoc
Core Development
- Ref. - PHPDoc
Press information
Wolf CMS books section
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.
Note:
- 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_idwould 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_idreturns 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_idreturns 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_idreturns 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.
