We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33379
    • 110 Posts
    Hi,

    I am using the idx value in a simple listing ordering process for an image gallery, but I am finding that when I change the order of the images in the MIGX grid the idx order stays as it was when the images were first loaded rather than changing to the new image order. This is giving rise to a situation where the order of the thumbnails doesn't match the order of the gallery images. Is this a bug or is it expected behaviour for this value? If it is expected behaviour, is there a way of getting a value for the actual position of the image when the order has been changed?

    Any, advice, help, suggestions much appreciated.

    Cheers - Zaphodx
      • 4172
      • 5,888 Posts
      [[+idx]]
      is allways counting, starting from 1 , no matter, which sorting

      If you want to have the order how items was created there is
      [[+MIGX_id]]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 33379
        • 110 Posts
        Thanks again Bruno for your response smiley

        This is my listing Tpl:

         <div class="thumbNav1">
            <a onclick="zxcFadeSS('picContent1',[[+idx]]-1);"><img src="[[+image]]" height="80px" width="auto" border="0px"></a>
          </div>


        I am using this because the js I'm using starts from "0" when numbering the images but am finding that this puts the thumbnails in the order the images were originally loaded not the order thay have subsequently been moved to. Perhaps this is the wrong way to do this?

        I tried [[+MIGX_id]] to see what would happen and just got seemingly random linking to the main images.

        Thanks - Zaphodx
          • 33379
          • 110 Posts
          Ok, this is solved. The idx value wasn't the problem, the method for reversing the sort order was. I've just seen your response to my "reversing sort order" post/question and using that has solved the problem.

          Many thanks for your help Bruno, and for MIGX which is one of the best things about MODx smiley

          Cheers - Zaphodx