We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28346
    • 30 Posts
    I want to use Ditto on my frontpage to show a list of the most recent news items in the website’s news & events section. Each of these articles will have an image file associated with it... a photo, logo or whatnot. How can I have the Ditto snippet to produce a list of these 3 or 4 most recent news articles with a thumbnail of that article’s associated image? Any help would be great. Thanks!

      • 7923
      • 4,213 Posts
      if the images are done with tv’s, then easily..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 28346
        • 30 Posts
        Umm.... undecided Can you elaborate?

        I have a TV for each article page called [*Image1*] and I’m calling the Ditto snippet from the front page using
        [!Ditto? &startID=`41` &tpl=`NewsChunk` &summarize=`4` &displayArchive=`0` !] 

        to show 4 articles in a folder with ID# 41.

        The chunk that I’m using for a template on the front page is:
        <span class="imgsty2"><img src="[*Image1*]" align="left" height="52"/></span>
        <li>
        <a href="[+id+].html">[+title+]</a><br />
        [+summary+]<br /></li>


        The problem is that whatever values I put in [*Image1*] for each of the news articles don’t follow it to the front page... it populate’s the [*Image1*] instance I call in the chunk with the TV value for the front page.

        -R
          • 34162
          • 1 Posts
          I guess the reason is that Ditto cannot relate to your [*image1*] TV in this way. It does just use, but not evaluate its template.
          Maybe it’s possible to make that TV become a part of the Ditto-[summary] output. Then it should work.
          But these remarks of mine are quite vague, since I’m not an experienced Ditto-user. embarrassed
            • 18397
            • 3,250 Posts
            You just need to use [+tvimage1+] as per the Ditto documentation.
              • 28346
              • 30 Posts
              That did it! Thanks.