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

    I’ve run into a little issue concerning the ordering of images. I’m doing order_by pos and order_direction ASC. I’ve found that if no position is entered in the manager, then images that have no position will take precedence over images that do have a position specified. I really want to keep using order_by pos and order_direction ASC because of the way I’ve made up some child gallery pages.

    I checked out the maxigallery.php file, figuring that there was a default like 0 or -1 that I could changed to 99999 (kinda hacky, I know), but this doesn’t appear to be the case.

    Can you give me some advice on how to make pics with no position entered NOT take precedence over pics that do have a position entered using order_by pos and order_direction ASC?

    Thanks,


    bhop


    Here are the calls I’m using - based on pics and thumbs on same page from wiki:
    [!MaxiGallery? &galleryOuterTpl=`ferProjectDetail_galleryOuterTpl` &galleryPictureTpl=`ferProjectDetail_galleryPictureTpl` &js=`ferMgJs` &quality_pic=`100` &quality_thumb=`100` &max_thumb_size=`220` &max_pic_size=`505` &pics_per_row=`9` &customFields=`Category` &manageOuterTpl=`ferProjectDetail_manageOuterTpl` &managePictureTpl=`ferProjectDetail_managePictureTpl` &manageButtonTpl=`ferProjectDetail_manageButtonTpl` &manage_target=`[[getFirstChildId]]` &css=`assets/templates/ferMasterTemplate/css/maxiGallery.css`!]

    [!MaxiGallery? &pictureTpl=`ferProjectDetail_pictureTpl` &quality_pic=`100` &quality_thumb=`100` &display=`pictureview` &manageButtonTpl=`ferProjectDetail_manageButtonTpl` &css=`assets/templates/ferMasterTemplate/css/maxiGallery.css`!]
      • 7923
      • 4,213 Posts
      You can create a custom managePictureTpl based on the original one and replace:

      value="[+maxigallery.picture.pos+]"

      with:

      value="[+maxigallery.picture.pos:is=``:then=`99999`:else=`[+maxigallery.picture.pos+]`+]"

      That will make it so that if picture position is not set, the default value for the field is 99999. You need to click save changes every time you upload new images for that value to save to the database.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."