Name

getgallery — get the next available slot in the named gallery

Synopsis

use Wacs;
use Wacs::WacsStd;
scalar getgallery(...); 
 

Parameters

parameterdescription
whichSpecifies which area to substitute in - can be either scategory (middle level) or sdirectory (lower level).
stypestype of the set concerned: typically I for image set, V for video.
sareaTop level area in which to search for the next available gallery slot
scategoryThe middle level directory entry (can be either simply specified or the subject of the substitution). This should include the variable pattern given in substitute below, as in gallery#NEXT#.
sdirectoryThe lower level directory entry (if needed, otherwise blank).
substituteThe string to be substituted with the value determined by the routine. Typically this will be something like #NEXT#.
dbhandleThe Perl DBI handle to the current database

Summary

The getgallery function returns the appropriate string for the next available slot in the gallery in the specified section. It can return either an scategory or sdirectory variable as requested via the which parameter. It is used to work out the placement of new sets within a gallery structure. What the next usable gallery is is determined by reference to the layout attribute setspergallery in the configuration file or the default value (usually 20) if not specified. Please see the configuration manual for more details on this configuration attribute.

Availabilty

As a collection administration function, getgallery is only available in perl.