Suggestion
Permalink Browser Info Environment
It'd be great to limit the amount of videos it puts out. For me, I'd like to show only the last 4 videos..
Type: | Discussion |
---|---|
Status: | New |
what about breaking the foreach loop after x amount of videos?
<ul class="clearfix thumbnails"> <?php $i = 1; foreach ($videos->video as $video): ?> <li> <a href="<?php echo $video->url ?>" class="thumbnail" rel="fjhadd_vg<?php echo $bID; ?>[fjhadd_vg_gallery<?php echo $bID; ?>]"> <img src="<?php echo $video->thumbnail_medium ?>" /> <span><?php echo $video->title?></span> </a> </li> <?php if ( $i = $maxVideos ) { break; } $i++; endforeach
Viewing 15 lines of 17 lines. View entire code block.
This could be made with the Advanced API. This add-on is using the simple API and it can't be done.
The only way is to make a album with those four videos.
Thanks for the suggestion. I am working on a more advanced gallery using the Advanced API