We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46668
    • 51 Posts
    Please Help!

    Using 2.3.1 new site everythings been installed this week

    I am using migx multi-upload to output images on a page using getImageList with the TV name of resourcealbum its my gallery page with an ID of 7 and it works perfect. It currently has no child pages and has 3 images uploaded and outputting fine.

    My aim now is to output the latest 2 images uploaded onto this gallery page show up on the sidebar that's on all the other site pages, I have this working on a test site but when I replicate it on a new site it just wont output anything, I've been though this so many times I give up here's my code can anyone see where I have gone wrong.

    getResources call
    [[!getResources? 
    &parents=`7`
    &tvname=`resourcealbum`
    &depth=`3`
    &tpl=`sideBarImg`
    &includeTVs=`1`
    &processTV=`1`
    &showHidden=`true`
    &limit=`1`
    &pageVarKey=`page`
    &element=`getResources`
    &sortdir=`desc`]]


    tpl sideBarImg
    [[!getImageList?
        &tvname=`resourcealbum`
        &tpl=`sideImg`
        &limit=`2`
        &processTVs=`0`
        &menutitle=`[[+menutitle]]`
        &docid=`[[+id]]`
      ]]

    tpl SideImg
    <img src="[[+image:add_before=`assets/resourceimages/[[+property.docid]]/`:phpthumbof=`w=120&h=120&zc=1`&f=png&fltr[]=ric|20|20`]]" alt="[[+menutitle]]">


    Snippet add_before
    return $options.$input;


    I've checked stuff like uppercase changed names tried a new parent it just outputs nothing, getResources is working I testing this by putting the wrong template name in it then output the array info.

    I am sure I am doing something wrong but I am not a technical user so if anyone can see any errors or give me any pointers on what to try next that would be very useful.

    Thanks

    Ian
    [ed. note: panfire last edited this post 12 years, 2 months ago.]
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Deos a getImageList snippet by itself on the resource where the images are in the TV work?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 4172
        • 5,888 Posts
        does it return anything with no tpl specified:

        [[!getImageList?
            &tvname=`resourcealbum`
            &tplXX=`sideImg`
            &limit=`2`
            &processTVs=`0`
            &menutitle=`[[+menutitle]]`
            &docid=`[[+id]]`
          ]]
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 46668
          • 51 Posts
          @sottwell GetImageList works on the resource page using this call:
            [[!getImageList? &tvname=`resourcealbum` &tpl=`lashGallery`]]


          @Bruno17 If I dont specify a tpl in the GetImageList call there is no output still.

          Many thanks for the replies

          Ian
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Those snippet calls just don't look right. I think you have some of the properties in the wrong snippet calls. Some of those properties are for getPage, not getResources. Try this.
            [[!getResources?
            &parents=`7`
            &tpl=`sideBarImg`
            &includeTVs=`1`
            &processTV=`1`
            &showHidden=`true`
            &limit=`1`
            &sortdir=`desc`]]


            [[!getImageList?
                &tvname=`resourcealbum`
                &tpl=`sideImg`
                &limit=`2`
                &docid=`[[+id]]`
                &pagetitle=`[[+pagetitle]]`
              ]]

              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 46668
              • 51 Posts
              Quote from: sottwell at Aug 04, 2014, 03:54 AM
              Those snippet calls just don't look right. I think you have some of the properties in the wrong snippet calls. Some of those properties are for getPage, not getResources. Try this.
              [[!getResources?
              &parents=`7`
              &tpl=`sideBarImg`
              &includeTVs=`1`
              &processTV=`1`
              &showHidden=`true`
              &limit=`1`
              &sortdir=`desc`]]


              [[!getImageList?
                  &tvname=`resourcealbum`
                  &tpl=`sideImg`
                  &limit=`2`
                  &docid=`[[+id]]`
                  &pagetitle=`[[+pagetitle]]`
                ]]


              Still no luck, whatever I do getImageList just wont output when inside the getResources call, if anyone fancies a challenge I am happy to give manager login.

              Thanks so much for all the help so far.

              Ian
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                PM or email me, I'll check it out.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org