Forum

Thread tagged as: Add-on-development, Gallery

Filtering gallery album by type

Hi guys, on my page I have:

<?php perch_gallery_albums(array( 'template' => 'my-album.html', 'image' => true, )); ?>

and in album.html I have

<perch:gallery id="type" type="select" options="Wedding Gallery|weddinggallery,Wedding Venues|weddingvenues,Recent Weddings|recentweddings,Celebrity Weddings|celebrityweddings,Published|publishedweddings,Portrait|portrait,Boudoir|boudoirs,Fashion|fashion,Baby|baby,Commercial|commercial,Occassions|occassions,Red Carpet|redcarpet" label="Type of album" />

Is there a way on my page I can call all albums with type 'recentweddings' for example...

<?php perch_gallery_albums(array( 'template' => 'c_album-image.htmlmy-album.html', 'image' => true, 'filter' => 'type', 'match' => 'recentweddings' )); ?>

At a loss here! Thanks guys!

Chris McGuicken

Chris McGuicken 1 points

  • 5 years ago

Woops - got it..

Just for future reference it's

<?php perch_gallery_albums(array(
    'template' => 'c_album-image.html',
    'image' => true,
     'filter' => 'type',
     'match' => 'eq',
     'value' => 'recentweddings'
)); ?>