We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37165
    • 89 Posts
    I am using MigxDB to store a bunch of artwork. In the DB there is a section for users to add in the series name for each artwork. On the front end I am generating a list of all the series names and then using Jquery isotope to sort them(this works fine). The problem that I am having is that on the front end I am getting duplicates of series names in my filterable list. I'm not sure if I need a snippet or what, but I need some way to have the call not repeat any entires.

    For example:
    These are my images
     <div class="colorSeries">image goes here</div>
    <div class="colorSeries">image goes here</div>
    <div class="colorSeries">image goes here</div>
    <div class="BWSeries">image goes here</div>
    


    Here is my MigxDB call to create the list that is used for isotope filters

    [[!migxLoopCollection?
    &packageName=`artwork`
    &classname=`artWorks`
    &sortConfig=`[{"sortby":"extendedThree","sortdir":"ASC"}]`
    &where=`{"artist_resource_id":"[[*id]]"}`
    &tpl=`tpl_artist_series`
    ]]	
    								
    


    This is the result that I get
    <li>Color Series</li>
    <li>Color Series</li>
    <li>Color Series</li>
    <li>Black and white series</li>
    
    


    But what I want is this:
    <li>Color Series</li>
    <li>Black and white series</li>
    
    


    It shows a series for each image on the page. But I want it to skip any duplicates. Any ideas?

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

    • discuss.answer
      • 4172
      • 5,888 Posts
      if extendedThree is your series_name - field try:

      &groupby=`extendedThree`
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 37165
        • 89 Posts
        Freaking awesome! Totally works. Thanks AGAIN!
          • 37165
          • 89 Posts
          Is there a way to accomplish this with MIGX instead of MIGXDB? I am trying to do the exact same thing with a smaller project that has the same set up just in MIGX not MIGXDB. I tried adding &groupby to my GetImageLIst call but nothing happened. Quote from: Bruno17 at May 28, 2014, 05:10 AM
          if extendedThree is your series_name - field try:

          &groupby=`extendedThree`
            • 4172
            • 5,888 Posts
            &groupby isn't a getImageList - property

            maybe

            &placeholdersKeyField=`extendedThree`


            could work, because it should make the value of the field 'extendedThree' the array-key of each MIGX-item.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 37165
              • 89 Posts
              Very cool! Works great. Thanks AGAIN Bruno!