Jump to:

23575 Posts in 19402 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » SS3 : how to find isPublished

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 313 Views
  • rsouthgate
    Community Member
    10 Posts

    SS3 : how to find isPublished Link to this post

    I'm trying to update some old SS2.4 code to work on SS3... Used to have this query... $publishedProfilePages = DataObject::get('ProfilePage', "\"Status\" = \"Published\");

    In SS 3 there is no Status Column on the SiteTree table... in fact looking at the code it seems the isPublished method of SiteTree instead queries the SiteTree_Live table.

    But I can't figure out how to use the DataList::create('ProfilePage') to look only in the SiteTree_Live table. Anyone know?


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.