Forum

Thread tagged as: Question, Gallery

perch_gallery_album_listing and multiple filters

Is it possible to use multiple filters with perch_gallery_album_listing?

I’ve tried using comma separated values in 'value' but it only uses the first value, I’ve also tried:

perch_gallery_album_listing(array(
  'template'=>'our_work_album.html',
  'filter'=>array(
    array(
      'filter'=>'albumSlug',
      'match'=>'neq',
      'value'=>perch_get('s')
    ),
    array(
      'filter'=>'albumSlug',
      'match'=>'neq',
      'value'=>'clients'
    ),
  ),
  'image'=>true
));

Which doesn’t apply either filter.

Nick Bramwell

Nick Bramwell 5 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

It's not currently possible with Gallery - it only supports single filters until it's next updated to use the new API.

Thanks Drew,

is the code above how the new API works when Gallery does get updated? Just so I know whether to keep that little snippet somewhere for future use.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that's the general approach.