Hello
I needed same option, + option to randomize images.
So if you aren't afraid of tweaking original code here is how I did it:
1. Backup original files !!!
2. In plugins/content/jw_sigpro/jw_sigpro.php file, below
$gal_template = (array_key_exists(6, $tagparams) && $tagparams[6] != '') ? $tagparams[6] : $thb_template;
approx line 228, I added this:
$gal_random = (array_key_exists(7, $tagparams) && $tagparams[7] != '') ? $tagparams[7] : $gal_rand;
$gal_nr_imgs = (array_key_exists(8, $tagparams) && $tagparams[8] != '') ? $tagparams[8] : $gal_nr_img;
1st line is to add random option in curly brackets
2nd line is to set number of photos
3. I wanted to use used responsive layout, so duplicated
plugins/content/jw_sigpro/tmpl/responsive folder
it and renamed it into mywebsitename,
Open default.php file and find this line:
foreach($gallery as $count=>$photo):
and change it into:
$img_nr = 0;
if($gal_random){
shuffle($gallery);
}
foreach($gallery as $count=>$photo):
if($gal_nr_imgs){
if($img_nr == $gal_nr_imgs){
break;
}
$img_nr++;
}
4. In SIG pro change default layout to yours,
OR override it:
{gallery}path/foldername::::::yourlayoutname:random:4{/gallery} - 4 photos random
5. Now you can use various combinations:
{gallery}path/foldername:::::::random:4{/gallery} - 4 photos random
{gallery}path/foldername::::::::5{/gallery} - only 5 photos, default ordering
{gallery}path/foldername:::::::random{/gallery} - all photos, random
Hints:
- Number of : in curly brackets is important. If you use other overriding options, such as thumbnail size code will differ:
{gallery}path/foldername:150:150:1:1:jquery_fresco:random:random{/gallery}
- Instead of "random" you can use just "r".
- Upgrading SIG pro will overwrite your change in jw_sigpro.php file. So be sure to write down a note what you did.
HTH
Regards