We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53460
    • 69 Posts
    https://nogreaterpartnership.bipc.com/diversity-inclusion/

    I have a simple MIGX TV list of optional titles for each person. I'm using [[!getImageList]] to call the info from my TV. The field is called "GroupPosTitle". I only want to show the titles with "Diversity" in them. How would I add logic to show only those relevant options? Here is my code:
    [[!getImageList?&docid=`[[+id]]`&tvname=`AttorneyPositionList`&tpl=`AttorneyPositionItem`]]


    I was thinking using the &where property but I'm not sure how. Something like this:
    &where=`[[+GroupPosTitle:contains=`Diversity`:then=`[[+GroupPosTitle]]`]]`


    I also tried this which resulted in no results:
    &where=`{"field:=":"GroupPosTitle","contains:=":"Diversity"}`


    Thanks in advance

    This question has been answered by jeffsydor. See the first response.

    [ed. note: jeffsydor last edited this post 6 years ago.]
    • discuss.answer
      • 53460
      • 69 Posts
      Nevermind, I figured out what to do.

      Instead of adding the logic to the &where property, I added it to the conditional in the tpl chunk:

      [[!getImageList?
          &docid=`[[+id]]`
          &tvname=`AttorneyPositionList`
          &tpl=`AttorneyPositionItem`
      ]]
      


      In the AttorneyPositionItem Chunk
      <p>[[+GroupPosTitle:contains=`Diversity`:then=`[[+GroupPosTitle]]`]]</p>