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

    I’m currently making a small directory links which I hope to include small thumbshots (www.thumbshots.com) images.

    • Revo 2.0.8
    • PHP 5.2.13
    • MySQL 5.0.91

    I set it up this way:

    1. I created a TV (text-in/text-out) i labeled "sitead". This will contain the website’s URL.
    2. Now, thumbshots are linked using this URL structure:
    http://open.thumbshots.org/image.aspx?url=http://www.website.com

    3. I created a TPL chunk, I named "dirlinks":
    <div class="listing">
    <img src="http://open.thumbshots.org/image.aspx?url=[[+sitead]]" alt="[[+pagetitle]]" />
    <h4><a href="[[~[[+id]]]]" title="[[+longtitle]]">[[+pagetitle]]</a></h4>
    <p>[[+introtext]]</p>
    </div>

    4. Then on the page where the links will be displayed, I called the list with getResources:
    [[!getResources? &parents=`10` &tpl=`dirlinks` &limit=`10`]]


    That’s basically the current setup. But the thumbshots fail to display. I tried using a static URL and it works. Is this possible? Or do I need to make something more?

    Looking at the resulting code, the [[+sitead]] doesn’t show up on the image url; it only looks
    http://open.thumbshots.org/image.aspx?url=


    I believe i’m doing something wrong. Any inputs or solution will be greatly appreciated.

    Thanks in advance.
      • 22019
      • 390 Posts
      You need to add &includeTVs=`1` to your getResources call. If you need the output formatted in a specific way you also need &processTVs=`1`
        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
        • 21106
        • 53 Posts
        Quote from: odeclas at Mar 21, 2011, 10:18 AM

        You need to add &includeTVs=`1` to your getResources call. If you need the output formatted in a specific way you also need &processTVs=`1`

        Thanks! It worked. I just have to add &includeTVs=`1` and &tvPrefix=``.