Hi Hope someone can help. Basically, I am using getResources to pull a custom TV image as well as document content.
All the content is being pulled in apart from the custom TV. This is how its set up:
In my template i have the following snippet call:
[[!getResources? &parents=`21` &tpl=`homeBanner` &includeContent=`1`&includeTVs=`1`&processTVs=`1`]]
Then the TPL homebanner contains this:
<li>
<img src="[[+tv.pageBanner]]" />
<div class="lof-main-item-desc">
<h2>[[+pagetitle]]</h2>
<p>[[+description]]
<a class="readmore" href="[[~[[+id]]]]">Read more</a>
</p>
</div>
</li>
And page banner is essentially an Image based template variable - but it outputs nothing. If i chnage it to output text, I get nothing.
This is drving me absolutely nuts! been round and round in circles - if anyone can please help. Can it be something to do with caching?
Dan
Hi,
Your call and template look great. That’s assuming there’s no typo on the TV name.

Any chance you recently changed templates on a document? If you’re using a TV that doesn’t explicity allow access to your new template, that’ll give you a big nothing. That’s my best guess. I think caching probably isn’t an issue.
Reading the Revo doc, it’s kind of funny having processTVs and includeTVs. I’m sure there’s some significant distinction, but the description left my scratching my head. In any case, I didn’t even bother with processTVs in my call.
Cheers, Dave
Hi Dave, Thanks for the reply.
I finally sorted it out.
The answer actually was obvious - its not clear in the instructions that you dont name the TVs at tv.my_tv (or whatever your TV name is.)
This is how the instructions are worded:
You also need to either prefix all TVs with tv. or use this parameter in your snippet tag:
1
&tvPrefix=``
In the Tpl chunk you use to display the getResources output, use a placeholder tag like this (but with the name of your TV):
1
[[+tv.my_tv]]
Now reading that it suggestes you preprend all your snippet names (when you create them) with tv. - well you dont.You only prefix the TVs in your CHUNK like that - the TV you create doesnt have tv. before it. But reading these instructions - they seem to suggest that is what to do....
The way I figured it out was that I removed the TPL call from the snippet,and then it outputted my TV calls and i could see them as:
[[+tv.tv.my_tv+]] rather than the required [[+tv.my_tv]]
Pretty obvious, and its a shame Ive wasted so much time on something so simple - I should have used the default output - without calling the TPL and read the results sooner, but the instructions could have been clearer.
Hope that clarifies the issue for anyone stuck with a similar problem.
Dan
Glad you fixed it. I can see where you’d think that. The new documentation, while very welcome, does vary in quality. Great coders may or may not be able to write documentation, of course.
Now I have the problem where *some* images in my custom template variable appear in getResources, but others dont - seemingly for no reason whatsoever....
If i remove the tpl - can see all the images in the defualt output. if I add the tpl, i only see 2 images out of 10. Must be a cache issue... but why does it output fine without the tpl and not with it?
Danny,
Interesting. In my testing I didn’t use that many documents, so you may very well have run into a caching or related problem. From your note, I’m thinking you must have displayed the array, saw all expected data there, but did some was missing when you did a "real" templated test.
My only thought would be to see if un-caching the docs with the missing images makes any difference. I wonder if any of the gurus around might have another idea, as I can imagine others finding this to be vexing.
You may want to list the particulars of your set-up here (or put it in your sig as I do) to see if anything untoward reveals itself. In my own testing, GetResources has been pretty cool, although I scratched my head at the documentation a bit, too.
Cheers, Dave
Since this thread has changed tact a little, i will start a new topic and post it in there.