Topic: "Filtering" a gallery

Hi there, I'm interested in creating a gallery of images for an interior decorator using JuiceBox Pro and Wordpress. She wants the default view of the gallery to show all her images and then wants links above the gallery that say "Bedrooms" | "Bathrooms" | "Family Rooms" | "Living Rooms" and these links to show only images of these rooms.

I was thinking that Flickr tags would be a good start to allowing this to happen. I'm not sure if I should create a new page with a new gallery for each room or if I can create one gallery and use some javascript in the links to have the gallery reload showing only certain photos with those tags.

Please let me know which approach is the best.

thanks, Sara

Re: "Filtering" a gallery

I'm not sure if I should create a new page with a new gallery for each room

This would certainly be the easiest approach and would be the only solution which could be achieved with WP-Juicebox (the Juicebox plugin for WordPress).
(You could still use Flickr tags for each gallery.)

or if I can create one gallery and use some javascript in the links to have the gallery reload showing only certain photos with those tags

This would certainly be possible but might be difficult to achieve in a WordPress environment (and it would not be possible with WP-Juicebox).
Here is an example of how it could be achieved using a sample gallery's 'index.html' file as a template. (The loadGallery function's parameter is the actual Flickr tag you would like to use for each gallery.)
You could manually upload your gallery files to your web server and copy and paste the relevant code from below into a WordPress page or post (modifying it as required to suit your needs).

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Juicebox-Pro Gallery</title>
        <meta charset="utf-8" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <style type="text/css">
            body {
                margin: 0px;
            }
        </style>
        <script src="jbcore/juicebox.js"></script>
        <script type="text/javascript">
            function loadGallery(tags) {
                new juicebox({
                    galleryWidth: '800',
                    galleryHeight: '600',
                    containerId: 'juicebox-container',
                    useFlickr: 'true',
                    flickrUserName: 'your_flickr_user_name',
                    flickrTags: tags
                });
            }
            $(document).ready(function() {
                loadGallery('tag1');
            });
        </script>
        </head>
    <body>
        <div id="juicebox-container"></div>
        <div id="links">
            <a href="#" onclick="javascript: loadGallery('tag1'); return false;">Tag 1</a>
            <a href="#" onclick="javascript: loadGallery('tag2'); return false;">Tag 2</a>
            <a href="#" onclick="javascript: loadGallery('tag3'); return false;">Tag 3</a>
        </div>
    </body>
</html>

Re: "Filtering" a gallery

Thank you for the detailed response! I'll probably try the first route. I really like your idea of the second route but I'm not familiar enough with how to use Javascript with Wordpress templates and it might take me a long time to troubleshoot and make it work.

I do have a follow-up question on how to display "all" tagged photos in my flickr photostream in my gallery as that will be the default view of her portfolio. Or should I just create a tag named "all" and assign it to every photo?

Re: "Filtering" a gallery

I do have a follow-up question on how to display "all" tagged photos in my flickr photostream in my gallery as that will be the default view of her portfolio.

If all of your images are tagged, then you can display all your images by just using flickrUserName="username" (and not using the flickrTags option).
If only some of your images are tagged and you want to display only the tagged images, then set flickrTagMode="ANY" and include all your tags in a comma-separated list using the flickrTags option, e.g. flickrTags="tag1, tag2, tag3".

Or should I just create a tag named "all" and assign it to every photo?

That will work, too.

For reference, descriptions of the 'Flickr Pro Options' can be found here.