Location of Archived or Published flags?

kyle shapiro asked on June 25, 2015 16:58

Hi everyone. I assume there's a flag in one of the tables in the database for the status of a page, i.e. Archived, Published, Saved? Would anyone happen to know the location of those flags? I have a sql query that will display something on a dropdown, but I only want it to display if the page is published. Currently it is not checking this status, and will display on the page always.

Recent Answers

Brenden Kehren answered on June 25, 2015 18:40

There isn't a specific fields for all of them, most are calculated and look at several different tables. For instance if you run the below query, you'll get the most current version for a document/page. In that version record you'll get can see if the version is archived or not. If not, then you have to look at the workflow ID and see what step in workflow the document is in.

select t.*, vh.*
from View_CMS_Tree_Joined t
inner join cms_versionhistory vh on t.DocumentPublishedVersionHistoryID = vh.VersionHistoryID
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.