I’m having trouble getting the showPublishedOnly parameter to work for me properly with Ditto 2.1. When I add &showPublishedOnly=`0` to my snippet call, I expect the results to be only unpublished documents. But I’m getting both published and unpublished...
So I checked the Ditto documentation site to see if I was misunderstanding how this should be used, and actually the documentation is self-contradictory:
showPublishedOnly
Purpose
Show only published documents
Options
0 show only unpublished documents
1 show both published and unpublished documents
Default
1 show only published documents
In my experience, I find that &showPublishedOnly=`1` shows only published documents, whereas &showPublishedOnly=`0` shows both published and unpublished. Which may be the way that it’s designed to work, in which case the documentation needs to be corrected. But it’s not what I actually need...
I have an events page that shows upcoming and recent events (documents in a folder) using two Ditto calls. The upcoming events call returns all of the published event documents, whereas the recent events call returns the ones that are unpublished (I set an unpublish date for each event). So it would be great for my situation if Ditto would show only unpublished events.