MODX Community

Pass TV Retrieved by getResources to getImageList

I read this post about using getResources values in getImageList calls and would like to know if this usage is constrained to standard modX fields, or if that can ANY template variable? Also, is it possible to use pdoResources rather than getResources?

I have the following pdoResources call configured for the latter scenario – it does not work as desired.

[[pdoResources?
  &tpl=`event_ItemApril`
  &parents=`12`
  &depth=`3`
  &where=`{"template:=":5}`
  &showHidden=`1`
  &includeTVs=`eventImage`
  &debug=`1`
]]

And the getImageList call that’s in the event_ItemApril chuck used by pdoResources:

 [[getImageList? 
  &tvname=`eventDetails`
  &tpl=`event_calendarItemApril`
  &docid=`[[+id]]`
  &sort=`[{"sortby":"date","sortdir":"ASC"}]`
  &eventImage=`[[+eventImage]]`
]]

And the chunk that uses the eventImage property:

<li class="eventItem eventItem__1">
    <div class="itemWrapper">
        <div class="eventItem__element eventItem--image clearfix">
            <img class="eventImage" src="[[+property.eventImage]]" alt="[[+name]]">
     </div>
    <div class="detailWrapper">
        <div class="eventItem__element eventItem--date">
            <span class="eventDate">[[+date]]</span>
        </div>
    <div class="eventMeta">
        <h4 class="eventItem__heading"><span>IN A LANDSCAPE:</span>&#32;[[+name]]</h4>
        <div class="eventItem__element eventItem--location-time">[[+location]]</div>
    </div>
</div>
<div class="eventItem__element eventItem__cta eventItem__cta--desktop">
    <div class="eventPurchase ctaItem"><a class="wp-button wp-button--small wp-button__white" href="[[+apID]]">Buy Tickets</a></div>
           <div class="eventDetails ctaItem"><a href="[[~[[+id]]]]">See Event Details</a></div>
       </div>
    </div>
    <div class="eventItem__element eventItem__cta eventItem__cta--mobile">
        <div class="eventPurchase ctaItem"><a class="wp-button wp-button--small wp-button__white" href="[[+apID]]">Buy Tickets</a></div>
        <div class="eventDetails ctaItem"><a href="[[~[[+id]]]]">See Event Details</a></div>
    </div>
</li>

Nevermind – got this to work with the tv. prepend for the tv placeholder in getImageList.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.