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

    i’m trying to setup the startpage for displaying the latest news with Ditto 1.0.2. The startpage should be look like this:

    Latest Ditto-News 1. (full-width)

    Other content (full-with)

    Latest Ditto-News 2. (half-width) - Latest Ditto-News 3. (half-width)

    Latest Ditto-News 4.
    Latest Ditto-News 5.
    and so on ...
    Ditto-Archive

    The page has many folders with subfolders and i can’t know where the authors write the next (latest) article witch should be display on the first position.

    My problem is that Ditto displays the latest news repeated in the different areas. I have tried a multiple call of Ditto also a multiple call in the template (chunk) for the news. What can i do to get the layout that i’m trying to describe above?

    Thank you for your support and help for this great CMS
    Olaf

    Ditto call
    [!Ditto? &startID=`30,32,38,43` &summarize=`1` &hideFolders=`1` &displayArchive=`0` &tpl=`NewsListingIndex01`!]
    [!Ditto? &startID=`30,32,38,43` &summarize=`2` &hideFolders=`1` &displayArchive=`0` &tpl=`NewsListingIndex02`!]
    [!Ditto? &startID=`30,32,38,43` &summarize=`3` &hideFolders=`1` &displayArchive=`0` &tpl=`NewsListingIndex03`!]
    


    <div class="teaser01">
    <p class="teaserheadline"><strong>[+pagetitle+]</strong> [+date+]</p>
    <h2><a href="[~[+id+]~]">[+title+]</a></h2>
    [+summary+] <span class="showall">[+link+]</span><br/>
    [+author+]
    </div>
    <div class="teaser02">
    <p class="teaserheadline"><strong>[+pagetitle+]</strong> [+date+]</p>
    <h2><a href="[~[+id+]~]">[+title+]</a></h2>
    [+summary+] <span class="showall">[+link+]</span><br/>
    [+author+]
    </div>
    <div class="teaser03">
    <p class="teaserheadline"><strong>[+pagetitle+]</strong> [+date+]</p>
    <h2><a href="[~[+id+]~]">[+title+]</a></h2>
    [+summary+] <span class="showall">[+link+]</span><br/>
    [+author+]
    </div>
    
      • 33337
      • 3,975 Posts
      Use &start parameter, e.g.

      [!Ditto? &startID=`30,32,38,43` &summarize=`1` &hideFolders=`1` &displayArchive=`0` &tpl=`NewsListingIndex01`!]
      [!Ditto? &startID=`30,32,38,43` &start=`2` &summarize=`2` &hideFolders=`1` &displayArchive=`0` &tpl=`NewsListingIndex02`!]
      [!Ditto? &startID=`30,32,38,43` &start=`5` &summarize=`3` &hideFolders=`1` &displayArchive=`0` &tpl=`NewsListingIndex03`!]
      


      1st call will display one the newest news item, second will show the next 2 and the third will next 3 and so on.

      Hope this helps.

      regards,

      zi
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 21970
        • 12 Posts
        Thank you zi

        now it works with the &start parameter but its heavy to explain. When i use your example it didn’t work.
        For the second and third latest news i have to setup the &start parameter to 1 and the &summarize to 3 and then it works. Hmm, crazy because i will show the two latest news and must set the &summarize parameter to 3.

        regards
        Olaf

        This Ditto call works for me.
        [!Ditto? &startID=`30,32,38,43` &summarize=`1` &hideFolders=`1` &displayArchive=`0` &tpl=`NewsListingIndex01`!]
        <div><p>other content</p></div>
        [!Ditto? &startID=`30,32,38,43` &start=`1` &summarize=`3` &hideFolders=`1` &displayArchive=`0` &tpl=`NewsListingIndex02`!]
        [!Ditto? &startID=`30,32,38,43` &start=`3` &summarize=`5` &hideFolders=`1` &displayArchive=`1`!]
        
          • 33337
          • 3,975 Posts
          You are right, I forgot to "add" into &summarize accordingly smiley, but its nice to hear that it works finally.

          regards.

          zi
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 18397
            • 3,250 Posts
            You will be happy to know that that little bug has been fixed for the next release.
              • 21970
              • 12 Posts
              OK, thank you Mark, no more headache in the next release with this small bug. wink