Cant get the TV's image on a preview overview page

Hi,

Im not new to MODX, but I am to this forum and in a bit of a new fase in my website/MODx work.

I’m trying to <img src="[[+tv.pr-img]]" alt="test"/> but only the alt text (test) is showing.

The pr-img is a TV of a project page and the same image needs to be displayed on another page as a preview.

So where do you use <img src="[[+tv.pr-img]]" alt="test"/> exactly? In a template-chunk used in combination with a call to getResources/pdoResources?


Maybe to show a TV from another resource, you could use the fastField functionality that comes with the pdoTools extra:

<!-- Return TV "pr-img" from the resource with id 10 -->
[[#10.tv.pr-img]]

Thanks, @halftrainedharry for the quick response.

Let me give some more context. Something I should have done in the first post :wink:

Situation: I want to have a system that can put ∞ page previews on a preview page. Preview content consists of (page)title, Alt text, (TV)image, and intro text (later also tags).
Output is all but TV images from other pages.

MODx: 3.0.1-pl.
Plugins: getResources 1.7.0-pl

Chunks: Project-preview

<div class="list-docs thumb grid">
    [[!getResources?
       &parents=`[[*id]]`
       &tpl=`Project-preview-tpl`
       &depth=`1`
       &limit=`9`
       &sortdir=`ASC`
       &includeTVs=`1`
       &includeTVList=`Image`
       &processTVs=`1`
       &showHidden=`1`
       &sortby=`menuindex`
    ]]
</div>

Chunks: Project-preview-tpl

<div>
<div>
<h2><a>[[+pagetitle]]</a></h2>
<div>
<p><a><img src="[[+tv.pr-img]]" alt="test"/></a></p>
</div>
</div>
<div>
<p>[[+introtext]]</p>
</div>
<div>
<p>tags</p>
</div>
</div>

TVs: pr-img
Input = image
Output = image

:upside_down_face:

Change this property to &includeTVList=`pr-img` or don’t use it at all.

Changing it or removing it does not work. Is there another thing we are overlooking?

I can’t reproduce any problems. It works when I test it.

Here is a link to the page. I just cant see anything.

:thinking:

Try setting “Output Type” to Default.

Thanks so much! It’s the combination of removing &includeTVList=Image`` and changing the output to Default. :white_check_mark:

Now it’s not showing the image on the article page anymore. :upside_down_face:
When I change the output back to Image it is the other way around again…

What’s the markup for the image on your article page?
Maybe just add something like this <img src="[[*pr-img]]">

:white_check_mark: Only using [[*pr-img]] does not work, using <img src="[[*pr-img]]"> works great because its the included img tag I guess.

Now I will start working on implementing the Thumbnail function. wish me luck :smile:

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.