I am trying to show a row of related posts on each single blog page.
I am using the getRelated snippet (getRelated - getRelated | MODX Documentation)
If I call the snippet like this:
It works but it only shows a list of titles that link to the posts.
For showing an image along the title I followed this tutorial:
But I can’t figure out where I’m supposed to get the TVs from
What do I need to put in the product.images TV?
The simplest solution is probably to add a TV “product.images” to your pages that is of Input Type “Image”, and then use something like
<img src="[[+product.images]]"> in your “getrelated.row”-chunk.
In the article you linked above, the image is read from a TV of type “MIGX”, but if you are not using MIGX for the images in your blog post then this just complicates things.
So where exactly are the images in your blog post stored?
I believe the product.images tv in that tutorial was a MIGX TV for multiple images, but you can just as easily use a standard image TV instead. Or if you want to use MoreGallery for galleries, call mgGetImages inside your
getrelated.row chunk passing the resource
[[+id]]. Whatever best suits your use case.