Member
Member
jackdaw   03-03-2012, 10:35
#1

In my gallery I have two main albums, like photography and painting. Within these albums lots of subalbums.

When I do a search within one of the albums within photography I'd like to get results only from that main album or one of its subalbums. And when I do a search within one of the albums within paintings I'd like to get results only from that main album or one of its subalbums.

Is this possible? I could make two themes for each of those main albums, but I don't know how to adjust the searchform. Can it be done with the objects_list?

$objects_list: optional array of things to search eg. [albums]=>[list], etc. if the list is simply 0, the objects will be omitted from the search

Administrator
Administrator
acrylian   03-03-2012, 10:47
#2

Yes. Use `array('albums' =>array('album-to-search1,album-to-search2,…')); Example for categories also on Zenpage theme's news.php.

BTW you don't need two full themes actually. Either a simple check for the current/parent album or using the multiple_layouts plugins should do it as well.

Member
Member
jackdaw   03-03-2012, 11:03
#3

Thanks!

Member
Member
sbillard   03-03-2012, 19:47
#4

The Effervescence+, Garland, and Zenpage themes all have the code so that a search performed from an album page occurs only within that album.

$album_list = array('albums'=>array($_zp_current_album->name),'pages'=>'0', 'news'=>'0'); printSearchForm(NULL, 'search', $_zp_themeroot.'/images/search.png', gettext('Search within album'), NULL, NULL, $album_list);
No special test or theme needed.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.