We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Addons, Gallery

Gallery App and categories

I have a site with a working gallery. The client has requested that some albums get filtered to various areas of the site and I thought I'd try doing this with categories.

I have created a set called 'Events' (slug 'events') and a category within the set called 'Weddings' (slug 'weddings'). On the page I am using 'perch_gallery_albums' but maybe additional settings are not required here?

perch_gallery_albums( array(
                           'template'=>'album-main-listing.html',
                           'image'=>true,
                           'filter'=>'event', //ID for set??
                           'match'=>'contains', //or eq?
                           'category'=>'Events/Weddings', //Set>Category?
                           'count'=> 3
                        ));
));

At present the code above returns 3 albums but does not filter. Any recommendations on what to try?

Ben Stillwell

Ben Stillwell 1 points

  • 5 years ago
Ben Stillwell

Ben Stillwell 1 points
Registered Developer

I forgot to add that I have added:

<perch:categories id="event" label="Type of event" set="events" />

to the album.html template. The category appears to show fine here.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Gallery predates the category system, so that's not going to work I'm afraid.