We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36830
    • 140 Posts
    I sucessfully created an RSS for my MODx blog but can't seem to get the image to be spit out via the TV. I have to have this working by next week or my client will toss the blog (and all my beautiful work). If i specify a specific html path in the image tags in the template that my RSS doc is using, it works fine (obv i dont want in the template but in the chunk), but the [[*TV]] syntax doesn't work at all. And nothing I do is getting the image to work in the chunk. Seems odd that this is overlooked in every MODx-blog-to-RSS-feed tut i've researched. Any ideas? Thanks so much. Here's code:

    template
    <rss version="2.0">
    <channel>
    <title>[[*pagetitle]]</title>
    <link>[[++site_url]]</link>
    <image>
      <url>[[++site_url]][[*article-image]]</url>
      <title>img</title>
      <link>[[++site_url]]</link>
    </image>
    <description>[[*content]]</description>
    <lastBuildDate>[[!getTime?format=`%a, %d %b %Y %H:%M:%S %z`]]</lastBuildDate>
    <language>en-gb</language>
    [[!getResources? 
       &parents=`3`
       &limit=`0`
       &sortby=`createdon`
       &sortdir=`DESC`
       &includeTVs=`1`
       &processTVs=`1`
       &includeContent=`1`
       &tpl=`rssListing`]]
    </channel>
    </rss>
    


    chunk:
    <item>
    <image>
      <url>[[++site_url]][[+tv.article-image]]</url>
      <title>img</title>
      <link>[[++site_url]]</link>
    </image>
    <title>[[+pagetitle:toCDATA]]</title>
    <link>[[!++site_url]][[~[[+id]]]]</link>
    <guid>[[~[[+id]]]]</guid>
    <pubDate>[[+createdon:strtotime:date=`%a, %d %b %Y %H:%M:%S %z`]]</pubDate>
    <description>[[+content:toCDATA]]</description>
    </item>
    
    • Is the image TV outputting anything when you look at the XML source?
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 36830
        • 140 Posts
        absolutely nothing... when i view the source of the page, I can see that the path determined by the [[++site_url]] tag is there but the rest of the path leading to the image (determined by the TV) isn't there. It must be something about the syntax...
          • 3749
          • 24,544 Posts
          Try adding this in the getResources tag:

          &tvPrefix=``


          and changing the tag in the Tpl chunk to:

          [[+article-image]]

            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
            • 36830
            • 140 Posts
            good general advice. but as i said, the file path in the resource template isn't even being completed... it's completed in the tpl, but i think i'm probably calling it wrong there (per item)... i figured if i can get it working for the template it's a step towards getting it to work in the tpl. didn't work btw, but thanks so much for the suggestion. is displaying images in RSS feeds that uncommon?
            • What version of Revolution are you using and what is the configuration of your Image TV?
                • 36830
                • 140 Posts
                revo 2.1.3

                image tv is very basic: image input, default output, prepend turned off but no dice. base path relative: yes, base url relative: yes.
                  • 3749
                  • 24,544 Posts
                  My point was that you're calling it
                  [[*article-image]]
                  in the template and
                  [[*tv.article-image]]
                  in the Tpl chunk. It's a lot easier and more reliable, IMO, if you use the actual name of the TV everywhere.
                    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