P
P
PiCensored2018-02-17 10:51:30
MODX
PiCensored, 2018-02-17 10:51:30

Why, when iterating over pdoPage resources and using getImageList(MIGX) and TV inside, the data of the first resource is substituted into getImageList?

UPD: Problem solved. I rewrote the code - it worked as it should. Suspicion that for example the sign "!" some was not correct, maybe the wrong encoding - copied from somewhere.
I display a list of resources on the page through pdoPage and using getImageList (MIGX) and TV inside, then the docid of the first resource is substituted in getImageList. And accordingly, all parameters added via MIGX are applied to all derived resources FROM THE FIRST RESOURCE. Ordinary (TV) additional fields are substituted normally - each resource has its own.
Conclusion:


Chunk (Code simplified, tag removed):
<div class="item">
  <a href="">
     <img src="
                
       " alt="">
  </a>
  <div class="info">
  <a href=""><h3></h3></a>
    <span></span>
                <span></span>
                 <span></span>
    </div>
  </a>
</div>
</div>

When I display a list of resources, then ordinary TVs correspond to each of their resources, but TV through MIGX is substituted for all resources from the first one displayed in the list. For some reason !getImageList caches the first resource and repeats to all other resources. If it outputs !getImageList inside the resource, then everything is fine. How to make that the output of the list of resources !getImageList matched each one?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PiCensored, 2018-02-19
@PiCensored

Problem solved. I rewrote the code - it worked as it should. Suspicion that for example the sign "!" some was not correct, maybe the wrong encoding - copied from somewhere.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question