We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I can’t seem to get a TV to show up with getResources.

    It works with Ditto, so I know the Tpl chunk (DittoImageChunk) is fine and the TV (DisplayImage) has content.

    The TV definitely contains a path to an image.

    Here’s the Tpl chunk:

    [[+pagetitle]]: <a href = "[[~[[+id]]]]"<img src="[[+DisplayImage]]" height="200" width="300" /></a>


    Here’s the getResources tag:

    [[!getResources? &includeTVs=`1` &processTVs=`1` &tvPrefix=`` &parents=`93` &tpl=`DittoImageChunk`]]


    I’ve tried it with and without &processTVs and with &tvPrefix=`’’` or left out. The pagetitles show up and it only shows resources where the TV has content so the snippet is working, but I always get <img src="" ...

    I don’t know if this is a bug or if I’m doing something wrong.

    BTW, shouldn’t tvPrefix default to an empty string instead of ’tv’? I thought we were moving away from the ’tv’ prefix.






      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 3749
      • 24,544 Posts
      I can get a TV if it has a "tv." prefix, but can’t seem to make getResources retrieve any TVs that don’t have a prefix.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
      • Quote from: BobRay at Nov 30, 2009, 07:42 PM

        I can get a TV if it has a "tv." prefix, but can’t seem to make getResources retrieve any TVs that don’t have a prefix.
        This is a bug in the snippet that sets the prefix to tv. if you pass an empty string. I’ll get it fixed in the next release.