Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Get published pages in SS3

Go to End

5 Posts   3396 Views


Community Member, 20 Posts

12 October 2012 at 11:24pm

Edited: 13/10/2012 3:12am

There is no more column Status in the SiteTree table in SS3.

Is there any standard way to get published pages only, e.g. PageClass::get()->filter("Status"=>"Published") or anything similar?


Community Member, 12 Posts

13 November 2012 at 9:33pm

I don't think you need to worry about this. Because it seems that in SS3

will only return published pages. Try this yourself by simply un-publishing a page in a filter...


Community Member, 89 Posts

3 October 2014 at 9:44am

public function getBlogEntrys() {
		$blogEntrys = BlogEntry::get()->filter(array("ParentID" => $this->ID))->sort(BlogEntry::$item_sort);
		return $blogEntrys;

getBlogEntrys - return all pages published and unpublished.
How to get() only published pages?


Community Member, 46 Posts

9 April 2015 at 1:54pm

I have the same problem. Very annoyingly, when logged in, get() will also return any unpublished and even deleted items, while it only returns the published items while not logged in. This makes it quite cumbersome to test while logged in to my website.

I have not found a solution to this yet. I wish the website only behaved differently for logged in users when stage=Stage was used in the URL or something like that.


Forum Moderator, 224 Posts

10 April 2015 at 1:17pm

Edited: 10/04/2015 1:18pm

Totally agree with you that the logged-in behaviour is confusing at best.

you can use something like Versioned::get_by_stage (see:

Hope that helps