Forum

Thread tagged as: Question, Gallery

Fetching Album Images based on Slug?

I'm using the Gallery App to show the contents of albums within pages. So I have:

media.php which shows all albums media-album.php which show an album which has been clicked on. The URL for this page looks like the following: http://example.com/media/album.php?s=fruit

Notice the slug of the album appears in the URL.

On that page I have the following which should show all images for the Album:

<?php 
  perch_gallery_album_images($slug); 
?>

My question is what is the correct way to dynamically fetch the slug so that it displays the correct album images? When I manually add it like so it works:

<?php 
  perch_gallery_album_images(fruit); 
?>

Thanks,

Dan

Dan Lee

Dan Lee 1 points

  • 3 years ago

Have you tried this Dan?

<?php perch_gallery_album_images(perch_get('s')); ?>
Dan Lee

Dan Lee 1 points

That does the job - thanks!