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

    This used to be so straightforward with Evo, but I just can’t get it working with Revolution.

    I’m trying to use Ditto to display a news summary on the home page of my site. I can call the pagetitle and introtext, but can’t seem to get a template variable to work, although its been associated with the right template, and has been populated with content.

    My chunk is called ’newsSummary’ and looks like:

    <img src="[[*newsThumb]]" width="120" alt"[[*newsThumbDesc]]" />
    <div class="news-text"><h2>[[+pagetitle]]</h2>  
    <p>[[+introtext]]</p>  
    <p>[[+link]]</p> 
    </div>


    My Ditto call is:

    [[Ditto? &parents=`2` &tpl=`newsSummary` &orderBy=`createdon ASC` &display=`3` &dateFormat=`%e %B %Y`]] 


    I’ve checked that the TVs are being associated with the correct templates, and I’ve checked the spelling of the TVs.

    Any help would be very much appreciated.

    Thanks
      • 17499 ☆ A M B ☆
      • 872 Posts
        • 21122
        • 153 Posts
        Just before you replied, I tried getResources, and although I had a few problems initially, I seem to have got it working now.

        Bit weird that you have to put ’tv.’ in front of your TVs.
          • 9212
          • 33 Posts
          I am having the same problem with Ditto. I followed your advice and downloaded getResources, but I cannot get it to work. I even tried just calling [[getResources]] to see what the output would be and it’s outputting nothing.

          My call is:

          [[getResources &tpl=`Slideshow_Image_Without_Caption` &parents=`1`]]
          


          My chunk is:

          <li>
            <img src="[[+tv.Slideshow_Photo]]" />                
          </li>
          


          The Ditto call generates the list structure, but no photo (I called the TV directly from the page containing it and that does work.) GetResources does nothing.

          Any clues would be appreciated!
            • 36592
            • 970 Posts
            Try this.
            [[!getResources? &tpl=`Slideshow_Image_Without_Caption` &parents=`1` &includeTVs=`1`]]