limit search to one album or directory?

Is there a way to setup zp to search only certain albums? On my site I have one directory where I keep all my photos, and then several dynamic albums that are generated by tags. Unfortunately when I search for an image I'm get duplicate results, one for every instance of the photo. Is there a way to limit the search to only ONE folder or album?

Comments

  • acrylian Administrator
    edited January 8

    Yes, pass an array to the 7th parameter of printSearchForm():
    https://docs.zenphoto.org/function-printSearchForm.html

    You will have to modify the theme used like this:

    $object_list = array('albums' => array('name-of-album-to-search-in')); // you might need to add the names of the subalbums of that album if they should be covered, too
    printSearchform(null, 'search', null, '', null, null, $object_list);

Sign In or Register to comment.