We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18463
    • 121 Posts
    Martijn van Turnhout Reply #1, 12 years, 11 months ago
    I’m currently trying to generate an archive with all the documents that are children of the parent document with ID number 25. Here’s my code:

    <ul>
      [[Ditto? &parents=`25` &id=`archive_en` &filter=`published,1,2` &tpl=`news_overview` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php` &summarize=`5` &paginate=`1` &paginateAlwaysShowLinks=`1` &language=`english`]]
    </ul>
    <p id="page_nav">[+archive_en_pages+]</p> 
    


    I’ve set this archive page to uncached, because I’m also using PHX. The thing is, I only want to generate a list with unpublished documents. 3 documents are currently a child of that parent and 1 of them is unpublished. However, this filter "&filter=`published,1,2`" doesn’t seem to work! It says "documents not found". While I’m hoping to see that 1 unpublished document shows up in the archives.

    I could use all the help here please!
    • You’ll need to add &showPublishedOnly=`0` to the parameters, this will allow unpublished resources to be shown. That plus the filter to filter out published resources should do the job.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 18463
        • 121 Posts
        Martijn van Turnhout Reply #3, 12 years, 11 months ago
        Ah I see, it’s the combination of the filter and the parameter that does the trick. Thanks!
        • It should... I’ve never actually done it.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org