We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5798
    • 22 Posts
    Hi,

    I have some strange behaviour of Ditto:

    The first blog entry I have written is displayed correctly in a short summarized version at the main blog page. In order to read and comment the entry, you have to click on the "read more" link to get to the page of the entry.

    But all further blog entries I have written are displayed in full at the main blog page and between each of them there is the comment chunk.

    I use Ditto 1.02 and Newspublisher 1.4 as shipped with MODx 0.95.

    The code from the post new blog page is:
    [!NewsPublisher? &folder=`2` &canpost=`Site Admins` &formtpl=`FormBlog` &footertpl=`Comments`  &rtcontent=`tvblogContent` &showinmenu=`1` &aliastitle=`1` &clearcache=`1`!]


    The code from the main blog page is:

    [[Ditto? &startID=`2` &summarize=`10` &total=`20` &commentschunk=`Comments` &tpl=`nl_blog` &paginate=`1`]]
    
    Artikel [+start+] - [+stop+] von [+total+]
    
    Seite [+previous+] [+pages+] [+next+] 
    


    Where is the fault?

    Greetings,
    CoreBit


    PS: I don’t have a TV ’tvblogContent’, but I have one that is called ’blogContent’. Still the parameter ’&rtcontent’ needs the non existing TV ’tvblogContent’, otherwise MODx complains, the blog content is missing when I post a new blog entry. Why is that?
      • 25663 MODX Staff
      • 12,272 Posts
      What does your nl_blog template look like? Also, Do you have a link we can see?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 5798
        • 22 Posts
        <div class="nl_summaryPost">
          <h3><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></h3>
          <div class="nl_info" >Von <strong>[+author+]</strong> am [+date+]. <a  href="[~[+id+]~]#commentsAnchor">Kommentare
          ([!Jot?&docid=`[+id+]`&action=`count-comments`!])</a></div>
          [+summary+]
          <div id="nl_comments_[+id+]" style="display: none;">
          [[Jot?&docid=`[+id+]`&action=`comments`]] 
          </div>
          <p class="nl_link">[+link+]</p>
        </div>


        The main blog page is http://www.nichteva.de/index.html

        You see the first blog entry at the bottom of the page and above a new one, which is not summarized.

        Thanks for your help!

        -CoreBit
          • 25663 MODX Staff
          • 12,272 Posts
          Put the following in a chunk called "Comments" (sans quotes), then replace it with a call to {{Comments}}:
            <div id="nl_comments_[+id+]" style="display: none;">
            [[Jot?&docid=`[+id+]`&action=`comments`]] 
            </div>
          


          The &commentschunk=`Comments` parameter expects your comments to be input via a chunk named "Comments"; otherwise it won’t remove anything else (and thus they show up in the summaries).
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 5798
            • 22 Posts
            That was the existing code for chunk "Comments":
            <div id="commentsAnchor">
            [!Jot? &customfields=`name,email` &subscribe=`1` &pagination=`10` &badwords=`{{BadwordsList}}` &canmoderate=`Site Admins` canpost=`` &captcha=`2` &guestname=`Anonymer Gast` &postdelay=`60`!]
            </div>


            I replaced it with your code. Now the comment form disappeared, but the newest blog still gets displayed in full.

            Any Idea?
              • 5798
              • 22 Posts
              I found out that, if I enter a summary text, the blog entry gets displayed correctly on the main blog page. This is strange because I did not add a summary text for the first blog entry, therefor it is truncated by Ditto as you can see on the "...".

              I don’t want to manually add a summarized version each time I write a blog entry.

              Any idea anybody, what could be wrong? Any hint will be welcome!

              Greetings,
              CoreBit
                • 25663 MODX Staff
                • 12,272 Posts
                See the migration guide for Ditto 1 -> Ditto 2. You need to add an extender.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me