`Why sorting through getResources elements and using inside getImageList displays all pictures?
S
S
Sergey Virchenko2016-02-26 17:14:42
MODX
Sergey Virchenko, 2016-02-26 17:14:42

Why sorting through getResources elements and using inside getImageList displays all pictures?

<div>
  [[getImageList?
                &tvname=`cellImages`
                &tpl=`@CODE: <img style="max-width: 100%" src="[[+image]]" alt=""> `
    &docid=`156046`
    &toPlaceholder=`imagelist`
        ]]
<div>
  [[+imagelist]]
</div>

this way I display pictures for the current element in getRosources, but if there are no pictures, it automatically adds pictures of the previous element... tell me how to solve the problem prntscr.com/a86rz6

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
S
Sergey, 2016-03-08
@SerjVirchenko

Try to check if TV is empty, but first turn on tv processing in getResources (unless, of course, it was previously enabled)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question