We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4429
    • 429 Posts
    I am messing about with a blog in revo, but found that getResources will not get my image tvs in the blog.

    Here is the call
    [[!getResourcesTag?
      &elementClass=`modSnippet`
      &element=`getResources`
      &tpl=`blogPost`
      &parents=`3`
      &limit=`5`
      &includeContent=`1`
      &includeTVs=`1`   
    &processTVs=`1`
      &tvPrefix=`tv`
      &showHidden=`1`
      &hideContainers=`1`
      &cache=`0`
      &pageVarKey=`page`
    ]]
    [[!+page.nav:notempty=`
    <div class="paging">  
    <ul class="pageList">
    [[!+page.nav]]  
    </ul>
    </div>
    `]]




    Here is the TPL
    <div class="post">
        <h2 class="title"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
        <p class="post-info">Posted by [[+createdby:userinfo=`fullname`]]
     [[+tv.tags:notempty=` | <span class="tags">Tags: 
    [[!tolinks? &items=`[[+tv.tags]]` &key=`tag` &target=`1`]]
    </span>`]]</p>
    [[+tv.main_blog_video]]
    [[+tv.main_blog_image]]
    
        <div class="entry">
        <p class="introtext">[[+introtext]]</p>
        </div>
        <p class="postmeta">
          <span class="links">
    <a href="[[~[[+id]]]]" class="readmore">Read more</a>
    | <a href="[[~[[+id]]]]#comments" class="comments">
        Comments ([[!QuipCount? &thread=`blog-post-[[+id]]`]])
      </a>
    | <span class="date">[[+publishedon:strtotime:date=`%b %d, %Y`]]</span>
          </span>
        </p>
    
    <hr/>
    </div>
      • 22019
      • 390 Posts
      Is it just the image TVs or the whole call that is failing (it looks like the getResources call is in a page with Richtext turned on, so it won’t process properly)?

      *Edit* looking at Jason’s response in another thread - it looks like &tvPrefix=`tv` should be &tvPrefix=`tv.` to match your template (I thought it automatically put the period in, but maybe it doesn’t).
        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
        • 4429
        • 429 Posts
        thanks.

        I removed &processtv=’1’ and removed &tvPrefix=`tv` and it works find now.

        Cheers