We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36805
    • 354 Posts
    I use a Ditto call and a Reflect call on the same page. My goal is to show a paginated article view accompanied by an archive navigation beneath it.

    The source of my articles is dynamic. That’s why the getSource snippet returns a page id to pull documents from. If the page id has subpages that match the filter everything shows fine. If not, the ditto call returns the "No articles were found" correctly. The Reflect call however will show "The Ditto object is invalid. Please check it.".

    There is nothing invalid to having no results as far as I’m concerned. I would like the Reflect snippet just to output nothing at all if there are no results.
    [!Ditto? &parents=`[[getSource]]` &display=`1` &tpl=`newsitem-no1` &paginate=`1` &extenders=`summary,dateFilter` &paginateAlwaysShowLinks=`1` &truncText=`More...` &sortBy=`pub_date` &id=`wp` &filter=`template, 8, 1` &noResults=`No Articles were found`!]
    <div id="ditto_info">Showing <strong>[+wp_start+]</strong> - <strong>[+wp_stop+] / [+wp_total+]</strong> Articles</div>
    <div id="ditto_pages"> [+wp_previous+] [+wp_pages+] [+wp_next+] </div>
    <div id="ditto_reflect"> [!Reflect? &config=`wordpress` &dittoSnippetParameters=`filter:template, 8, 1|parents:[[getSource]]` &id=`wp` &getDocuments=`1`!] </div>