We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33238
    • 388 Posts
    Hello, I have this MigX call that change the tpl depending on a field value (MIGX_formname) inside the migXExample TV.

    [[getImageList?
        &tvname=`migXExample`
        &tpl=`@FIELD:MIGX_formname` 
    ]]
    


    It's possible to create a conditional with the @FIELD:MIGX_formname result?

    Something like:

    @FIELD:MIGX_formname:is=`section3`:then=`Yes`:else=`Ok`

    Thank you!

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

    [ed. note: Ysanmiguel last edited this post 6 years, 7 months ago.]
      --
      ysanmiguel.com
    • discuss.answer
      • 33238
      • 388 Posts
      Well I found a solution, create a string with the values on MIGX_formname field, then find the values in the string:

      [[getImageList:contains=`section3`:then=`YES`:else=`OK`?
          &tpl=`MIGX_formname` 
          &tvname=`contentDynamic`
      ]]


      I'm using getCache so it is something like this:
      [[!getCache:contains=`section3`:then=`YES`:else=`OK`? 
          &element=`getImageList`
          &tpl=`MIGX_formname` 
          &tvname=`contentDynamic`
      ]]


      &tpl=`MIGX_formname` only contains the field that I need to check:
      [[+MIGX_formname]]


      that is it, let me know if there is something to correct.

      cheers.
        --
        ysanmiguel.com