We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5811
    • 1,717 Posts
    Here is a demo for an effective search with AjaxSearch in Maxigallery. All works fine except you need to click twice on the Go! button to see all the picture results. This come from the fact that thumbnails are not preloaded and height unknown when the window is built.

    For instance try "chin" as searchterm.

    To display the results I use :
    [!MaxiGallery? &pic_query_ids=`[+as.gal_id+]`!]
    where the placeholder as.gal_id is provided by AjaxSearch.

    I have already meet this problem on this demo and solve the same kind of issue by adding the height to each image. Here I have tried to add a css style with the &css parameter like this:
    [!MaxiGallery? &pic_query_ids=`[+as.gal_id+]` &css=`picQueryIds`!] 
    And defined the picQueryIds chunk as follow:
    #thumbscontainer ul li a img.thumbnail{
       height: 120px;
    }
    But nothing has changed huh
    Under web developper I could see that the new img.thumbnail selector is not taken into account.

    Any ideas ?
      • 7923
      • 4,213 Posts
      The &css parameter in MaxiGallery makes it put the css to the <head> of the document where the snippet is run. Is it not there?

      You can also create a custom galleryPictureTpl template based on the original to set the height of the thumbnails. You can get the thumbnail height in the template from [+maxigallery.picture_height_thumb+] placeholder.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 5811
        • 1,717 Posts
        Thanks Doze.
        It runs perfectly with a new galleryPicture template. Starting now search in Maxigallery is effective with AS.
          • 7923
          • 4,213 Posts
          Great stuff coroico, with the search and rating snippets both supporting MaxiGallery, users of MODx can build very nice galleries. Thanks a lot for the great work that you are continually doing! Keep it up!


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