We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4749
    • 623 Posts
    Sometimes I feel like I’ve got it down, then something like this happens. Here are my calls:

    Ditto:
    [!Ditto? &parents=`44` &display=`3` &tpl=`blogTpl` &paginate=`1` &extenders=`summary,dateFilter` &dateSource=`pub_date` &dateFormat=`%B %e, %Y` &orderBy=`pub_date DESC` &paginateAlwaysShowLinks=`1` &tagData=`documentTags` &getDocuments=`1` &trunc=`1` &truncLen=`1000` &truncOffset=`20` &truncText=`...Continue Reading` !]
    
    <p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles</p>
    
    <div id="ditto_pages"> [+previous+]  [+pages+]  [+next+] </div>


    Reflect:
    [!Reflect? &targetID=`44` &tplContainer=`archive` &tplYear=`archiveYear` &tplYearInner=`archiveYearInner` &tplMonth=`archiveMonth` &getDocuments=`1` &dittoSnippetParameters=`parents:44` &dateSource=`pub_date` &monthSortDir=`DESC` !]


    Blog TPL:
    <div class="post">
    	<h2><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></h2>
    	[+summary+]
            <span class="continue">[+link+]</span>
            <div class="clearer"></div>
    	<div class="post_info" >Posted by <strong>[*blogAuthor*]</strong> | [+date+] | Tags: [+tagLinks+]</div>
    </div>
    


    Both of the calls are obviously on the same page. The reflect call is in the side bar. But when I click on the months they’re just reloading the page and nothing is happening except it brings back an insanely long url string and not sorting anything. Like this one:

    http://www.mysite.com/blog/?reflect_772_month=4&reflect_772_year=2008&reflect_772_day=false&reflect_772_start=0&reflect_35_year=2008&reflect_35_month=false&reflect_35_day=false&reflect_35_start=0&reflect_989_month=5&reflect_989_year=2008&reflect_989_day=false&reflect_989_start=0&reflect_546_month=4&reflect_546_year=2008&reflect_546_day=false&reflect_546_start=0&reflect_593_month=5&reflect_593_year=2008&reflect_593_day=false&reflect_593_start=0&reflect_308_month=5&reflect_308_year=2008&reflect_308_day=false&reflect_308_start=0

    Any takers?
      The MODx has you...
      Utah Web Design
      • 36592
      • 970 Posts
      How about adding &id parameter to both Ditto and Reflect call ?
        • 4749
        • 623 Posts
        I tried adding the id before I posted and it just kills the pagination. The reflect snippet will work, but I need the pagination to work too.
          The MODx has you...
          Utah Web Design
          • 18397
          • 3,250 Posts

          If you plan on having multiple Ditto calls using pagination on one page or using Reflect in your template make sure you use the &id parameter. Set it to a unique string and then update your placeholders to the format [+id_placeholder+].For example, if you id was foo and your palceholder pagetitle, you should use [+foo_pagetitle+]. Also, If you have PHx installed you will need to call Ditto cached on an uncached page.
            • 4749
            • 623 Posts
            Strange!?! I gave them the &id parameter and appended all the placeholders, but the content disappeared. So, I put the placeholders back to their original names and change the id to match the div id and all is working for now. This was weird. I think it may have been the I initially gave the &id parameter the docid and not a unique name. Hmm, well, it’s working.
              The MODx has you...
              Utah Web Design