I'm trying to output template variables from resources input into a MIGX template variable, which references a template variable with an input type of 'Resource List'. Is this possible?
I've got a template variable(TV) in MODX which has an input type of "Resource List", this TV is called 'product_offer'. This resource list has a where clause which states that it can only contain products with a certain template ID.
I then have another TV which has an input type of MIGX. I use this TV to allow one of my resources to select a list of Resources in a template variable. The MIGX TV's form tab JSON is below. This TV is called 'offersList'.
[
{"caption":"Product", "fields": [
{"field":"Product","caption":"Product","inputTV":"product_offer"}
]}
]
In one of my chunks i'm using getImageList (snippet that comes with migx) to display the list of resources that I've input into the 'offers_list'. Code snippet below:
[[getImageList?
&tvname=`offersList`
&tpl=`StoreCategoryTpl-New`
]]
The chunk "StoreCategoryTpl-New" accesses the resources with this specific ID's template variables and displays a number of them. A cut-down snippet of the chunk is below.
<div class="product-container">
<img src="[[+tv.productImage:phpthumbof=`w=150&h=150&zc=1`]]" alt="Thumb of ([[!getResourceField? &id=`[[+product]]` &field=`pagetitle`]])" />
<h3>[[+pagetitle]]</h3>
</div>
Everywhere else in the site I have used this chunk to output the result of a getResources call, getResources of course can output Template Variables.
Can I access the template variables from the resources I've selected in my 'offersList' MIGX TV and output them in the chunk? I can't find any material for this on the forum or through Google searching.
If not, is the only solution to do this with getResources, and perhaps make a new TV which allows the user to enter in multiple Resource ID's as the value, then feed that into the getResources call (to only get those resources)?