I am using a CAML query to retrieve a list of articles in a Pages library in SharePoint publishing web site. I need to retrieve all the published articles. If I use a query like
<Eq><FieldRef Name='_ModerationStatus' /><Value Type='ModStat'>Approved</Value></Eq>
then I will only get the currently published articles. But if there is a previously published version, I need to retrieve the previously published version of the article.
For example, if an article is published(then it is retrieved and is displayed) and the editor will edit the article for a minor modification, then if I put the above query, then the article is not retrived at all(and goes out from the display).
If I dont put the above query then even the draft versions are retrieved(and displayed)