We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26968
    • 25 Posts
    Hello,
    This is my first time using the ModX forums and not quite sure what the protocol was for posting something.
    I am not even sure if this is worthy of posting a new topic.

    I am trying to create a easy quicktime video library.
    Example:
    http://www.shawntorres.com/modxtest/index.php?id=47

    I created a template with an image template variable. The tv is called is called "thumbnail" I want to display the thumbnail when I run ditto and created this template chunk for it:

    <div class="videodetail">
    <a href="[~[+id+]~]" target="_self"><img src="[+thumbnail+]" alt="video" width="145" height="80" /></a>

    <strong><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></strong>

    [+longtitle+]


    </div>

    I have tried a few different things and have been unable to make the thumbnail image display.
    What am I doing wrong?
    If this message was not sent to the right person, I apologize, please direct me to appropriate parties.
    any help would be appreciated.
    thanks,
    s.
      • 3707
      • 241 Posts
      Could you post your Ditto call so we can take a look at it please.
        • 26968
        • 25 Posts
        Sure, thanks.

        [[Ditto? &startID=`48` &tv=’thumbnail’ &summarize=`2` &total=`20` &tpl=`vidtpl` &showarch=`0` &truncLen=`100` &truncSplit=`0`]]
          • 3707
          • 241 Posts
          &tv isn’t a Ditto parameter, try removing that.
            • 26968
            • 25 Posts
            OK,
            It is now:
            [[Ditto? &startID=`48` &summarize=`2` &total=`20` &tpl=`vidtpl` &showarch=`0` &truncLen=`100` &truncSplit=`0`]]

            still not working. Is Ditto able to display a tv image? Am I using the wrong tool?
              • 3707
              • 241 Posts
              Which version of Ditto are you using? &startID has been replaced by &parents and I haven’t heard of &showarch. I’m also not sure you need the summary stuff to display an image.

              Are you using the Image widget in your thumbnail TV? If so, you can’t place the [+thumbnail+] placeholder inside the src of an image tag because the Image widget outputs the <img> tag code.

              Either change the template chunk code to:
              <a href="[~[+id+]~]" target="_self">[+thumbnail+]</a><br/>

              Or, don’t use the Image widget and so that the TV outputs the image path only and use your current chunk:
              <a href="[~[+id+]~]" target="_self"><img src="[+thumbnail+]" alt="video" width="145" height="80" /></a><br/>
                • 26968
                • 25 Posts
                Thanks Bob 1000, let me try...be back shortly.
                  • 26968
                  • 25 Posts
                  Awesome, that did the trick.
                  http://www.shawntorres.com/modxtest/index.php?id=49

                  Yeah, I guess the startid and showarch were leftovers from previous generations, I copied the ditto call from the sample site matts that came with the installation.
                  They really helped me understand many of the concepts as I am more designer than developer.
                  I fixed that, and I removed the "image" widget from the template variable, now all I get is the output line which I can place in a hidden div.

                  The more I learn about ModX, the more I love it.

                  Thanks for all your help.