We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    Hi smiley, hope someone out there can help me with this problem? (could be an oversight on my part, 72hrs of constant analysis have left my eyeballs in a poor state!)

    I have created an Image TV called [+itemThumbs+]

    I have the correct Template Access and Permissions set. (to note, in trying to resolve issue, I also made the TV available to all Templates, this still failed to produce the image)

    I can see the image with [+itemThumbs+] within the web page (I added this in Resource Content section)

    The image [+itemThumbs+] is not showing in the Chunk called by Ditto. The image is displayed as a broken image.

    The html output shows <img src"" alt="Name" width="95" height="96" /> so it appears not to be carrying the image url reference over...

    The Chunk (librarytemplateimage) :

    <h4 class="news-list"><a href="[~[+id+]~]">[+pagetitle+]</a></h4>
    <img src="[+itemThumbs+]" alt="[+title+]" width="95" height="96" />

    <small>on [+date+]</small>

    [+introtext+]
    <br style="clear:both" />
    <a href="[+url+]"> read more...</a>


    <hr class="summary" />


    The Ditto Call:

    [!Ditto? &parents=`54` &tpl=`librarytemplateimage` &display=`4` &paginate=`1` &paginateAlwaysShowLinks=`0` !]

    also tried

    [[Ditto? &parents=`54` &tpl=`librarytemplateimage` &display=`4` &paginate=`1` &paginateAlwaysShowLinks=`0` ]]

    I have a temp work around, in that I can input html into the Summary section and link directly to the image, but this is not ideal as site Authors require the ability to add the thumbnail image.

    Hoping someone can shed some light on why the image TV is not showing via the Ditto call.

    Just for ref using Ditto 2.1.0 and MODX rev 6066.

    Thanks
      • 7231
      • 4,205 Posts
      This should work. I would make sure that there is no typo int he TV name. If not, try renaming the TV, I had a problem on a site the other day where the developer had 2 TV with the same name and that was causing all sorts of problems.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 34162
        • 1 Posts
        Thanks for the quick response dev_cw.

        Renaming the TV worked!! must have been a little quirk somewhere... thank you so much.

        For anyone else with this issue, after intially renaming the TV it still failed to display the image, although the ditto call returned the image url ref correctly. To resolve this I ammended the Chunk too:

        <h4 class="news-list"><a href="[~[+id+]~]">[+pagetitle+]</a></h4>
        [+newTVName+]
        <-- this line was originally <img src="[+itemThumbs+]" alt="[+title+]" width="95" height="96" />

        <small>on [+date+]</small>

        [+introtext+]
        <br style="clear:both" />
        <a href="[+url+]"> read more...</a>


        <hr class="summary" />

        Works now as expected.

        Again thanks dev_cw

        grin