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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

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

Which table should I query, ServicePage _live or ServicePage _version or ServicePage


Go to End


1603 Views

Avatar
Ben_W

Community Member, 80 Posts

18 May 2009 at 11:30am

Hi,

I have created a new page type call 'ServicePage', in the database, there are three table in relation to this page type. 'ServicePage', 'ServicePage_Live', 'ServicePage_versions'. Now, in the front end, I have a page which simply display all the services that has been created. Which table should I query, that will only display all published page if user views the published site, and display those new draft page, if user views draft site. In other words, I am trying not to display pages that are not published.

Thanks