We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23849
    • 223 Posts
    This was fixed by including the &showHidden=`1` parameter in the getResources call (a required param when parsing Articles resources).

    ––

    Hi all,

    I'm looking to show the migx records of one resource in another resource, based on a TV value rather than the docid.

    The best solution for this seemed to be using getResources and the &tvFilters parameter.

    Here's my getResources call:

    [[!getResources? &parents=`5` &tvFilters=`bike-featured==1` &tpl=`featured-bike-images` &includeTVs=`1` &processTVs=`1`]]


    getResources tpl (aka getImageList call):
    [[!getImageList?
    	&tvname=`migx-bike-images`
    	&tpl=`bike-images-tpl`
    	&docid=`[[+id]]`
    ]]


    MIGX tpl:
    [[!If?
       &subject=`[[+bike-image-last]]`
       &operator=`EQ`
       &operand=`1`
       &then=`{image : '[[+bike-image-large]]', thumb : '[[+bike-image-large:phpthumbof=`w=133&h=89&q=90`]]'}`
       &else=`{image : '[[+bike-image-large]]', thumb : '[[+bike-image-large:phpthumbof=`w=133&h=89&q=90]]'},`
    ]]



    Unfortunately, this is rendering nothing. If I just put the getImageList call into my document with a specified ID in the &docid parameter, it works fine.

    Any thoughts as to why this isn't working using getResources and the &tvFilters parameter would be much appreciated! [ed. note: presson83 last edited this post 11 years, 7 months ago.]
      Nick Hoag
      Creative Partner
      The FutureForward

      http://thefutureforward.com
      • 4172
      • 5,888 Posts
      may be a caching-issue. Try to call the snippets cached or the placeholder uncached.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 23849
        • 223 Posts
        Thanks for the reply, Bruno.

        I've now tried calling both snippets cached, my resource as cached and uncached, and assuming caching the placeholder would be &docid=`[[!+id]]`, I tried that as well...all with no luck.

        Any other ideas on this?
          Nick Hoag
          Creative Partner
          The FutureForward

          http://thefutureforward.com
        • You did not post your Migx tpl but I'm sure your having the same issue I had in this post, check brunos response about the property prefix.

          http://forums.modx.com/thread/78950/odd-issue-with-migx

          Hope that helps.
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 23849
            • 223 Posts
            Hmm,

            That seems to be regarding using resource fields in your MIGX tpl, no?

            Here's my tpl. I'm only referencing MIGX TV values, no resource fields:

            [[!If?
               &subject=`[[+bike-image-last]]`
               &operator=`EQ`
               &operand=`1`
               &then=`{image : '[[+bike-image-large]]', thumb : '[[+bike-image-large:phpthumbof=`w=133&h=89&q=90`]]'}`
               &else=`{image : '[[+bike-image-large]]', thumb : '[[+bike-image-large:phpthumbof=`w=133&h=89&q=90]]'},`
            ]]


            I've tried it with and without the "If" snippet in place, as well as pretty much every combination of cached/uncached calls I can think of, all with no luck.

            Feeling pretty clueless here :/ [ed. note: presson83 last edited this post 11 years, 7 months ago.]
              Nick Hoag
              Creative Partner
              The FutureForward

              http://thefutureforward.com
              • 4172
              • 5,888 Posts
              are you online with this? If yes, can I have a look into it?
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 23849
                • 223 Posts
                Most definitely. Do you use an instant message program? Aim? Google chat? Perhaps we can connect on one of those. My AIM name is nickffwork.

                I also just sent an email to [email protected] [ed. note: presson83 last edited this post 11 years, 7 months ago.]
                  Nick Hoag
                  Creative Partner
                  The FutureForward

                  http://thefutureforward.com