Image gallery - filtering results based on category

5 posts by 2 authors in: Forums > CMS Builder
Last Post: November 11, 2016   (RSS)

By ross - November 10, 2016

Hi there.

Thanks for posting

Could you post a copy of both your pages (not just a link to them) so I can review the code?

Also, if you know how, could you post a copy of the schema files for your two sections. They will be in /data/schemas/.  Having the schemas gives me more options on narrowing everything down. The schemas aren't required though so if it doesn't work to post them, don't worry; I can still work with just the pages.

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Thanks Ross. Please see below

gallery.php

<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  
  // load viewer library
  $libraryPath = 'cms/lib/viewer_functions.php';
  $dirsToCheck = array('/home/thth3571/public_html/','','../','../../','../../../');
  foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

  // load records from 'gallery2'
  list($gallery2Records, $gallery2MetaData) = getRecords(array(
    'tableName'   => 'gallery2',
    'loadUploads' => true,
    'allowSearch' => false,
  ));

?>


<!doctype html>
<html lang="en">
<head>

<meta charset="utf-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Home</title>
<meta name="description" content="Startups template">
<meta name="keywords" content="Startups template">
<link rel="shortcut icon" href="assets/img/favicon.ico">
<link rel="apple-touch-icon" href="assets/img/apple-touch-icon.jpg">
<link rel="apple-touch-icon" sizes="72x72" href="assets/img/apple-touch-icon-72x72.jpg">
<link rel="apple-touch-icon" sizes="114x114" href="assets/img/apple-touch-icon-114x114.jpg">
    
    
<!-- Magnific Popup core CSS file -->
<link rel="stylesheet" href="http://www.thenelunefoundation.org/new/assets/magnific-popup/magnific-popup.css">

<!-- jQuery 1.7.2+ or Zepto.js 1.0+ -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

<!-- Magnific Popup core JS file -->
<script src="http://www.thenelunefoundation.org/new/assets/magnific-popup/jquery.magnific-popup.js"></script>    
    
    
<link rel="stylesheet" type="text/css" href="assets/css/custom-animations.css" />
<link rel="stylesheet" type="text/css" href="assets/css/lib/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />

<!--[if lt IE 9]>
<script src="assets/js/html5shiv.js"></script>
<script src="assets/js/respond.min.js"></script>
<![endif]-->
</head>

<body id="blog-page" class="products-page">
<!-- Preloader -->
<div class="preloader-mask">
<div class="preloader"><div class="spin base_clr_brd"><div class="clip left"><div class="circle"></div></div><div class="gap"><div class="circle"></div></div><div class="clip right"><div class="circle"></div></div></div></div>
</div>

<!-- Header -->
<header>
<nav class="navigation navigation-header relative-header background-header">
<div class="container">
<div class="navigation-brand">
<div class="brand-logo">
<a href="index.html" class="logo"></a><a href="index.html" class="logo logo-alt"></a>
</div>
</div>
<button class="navigation-toggle">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button> <div class="navigation-navbar collapsed">
<ul class="navigation-bar navigation-bar-left">
<li><a href="#about">About</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#sponsors">Sponsors</a></li>
                        <li><a href="news.php">News</a></li>
                        <li><a href="events.php">Events</a></li>
                        <li><a href="gallery.php">Gallery</a></li>
                        <li><a href="contact.php">Contact</a></li>
</ul>
<ul class="navigation-bar navigation-bar-right">
<li><a href="howtohelp.php">How to help</a></li>
<li class="featured"><a class="btn btn-sm btn-outline" href="donate.php">Donate</a></li>
</ul>
</div>
</div>
</nav>
</header>


    <div class="container">

<h3 class="highlight">GALLERY</h2>
<p class="post-text"><br>
Pictures from our recent charity events<br>
</p>
                
                
<?php foreach ($gallery2Records as $record): ?>
<li><a href="<?php echo $record['_link'] ?>"><?php echo $record['category'] ?></a></li>
<?php endforeach ?>

<br><br><br><br><br>
                
                
                </div>     
        
        
        
        
        





</div>
</div>




<footer id="footer" class="footer light-text">
<div class="container">
<div class="footer-content row">
<div class="col-sm-3 col-xs-12">
                
<ul class="list-unstyled">
<p>The NELUNE Foundation<br>
PO Box 1033,<br>
Spit Junction 2088 NSW</p>
<p><strong>Media Enquiries:</strong><br>
Marketing Manager<br>
NELUNE Foundation<br>
<a href="mailto:info@thenelunefoundation.org">info@thenelunefoundation.org</a><br>
02 8082 8199<br></p>

<div class="social-wrap">
<ul class="list-inline socials">
<li><a href="https://www.facebook.com/nelunefoundation/"><span class="icon icon-socialmedia-08"></span></a></li>
<li><a href="http://twitter.com/NeluneR"><span class="icon icon-socialmedia-07"></span></a></li>
<li><a href="http://www.youtube.com/channel/UCVutWJqVU8Jw0-U7MZOiAQg?feature=watch"><span class="icon icon-socialmedia-29"></span></a></li>
</ul>
</div>
          
                
                

</div>

<!--
<div class="col-sm-4 col-xs-12 border">
<a href="#about">About</a><br>
<a href="howtohelp.php">How to help</a><br>
<a href="donate.php">Donate</a><br>
<a href="#projects">Projects</a><br>
<a href="#sponsors">Sponsors</a><br>
<a href="news.php">News</a><br>
<a href="events.php">Events</a><br>
<a href="gallery.php">Gallery</a><br>
<a href="contact.php">Contact</a><br>
</div>

                
<div class="col-sm-3 col-xs-12">
</div>
-->
                
                
</div>
</div>
        
        
<div class="copyright">© <script type="text/javascript">
  document.write(new Date().getFullYear());
</script> The NELUNE Foundation. All rights reserved</div>
</footer>

<div class="back-to-top"><i class="fa fa-angle-up fa-3x"></i></div>

<!--[if lt IE 9]>
<script type="text/javascript" src="assets/js/jquery-1.11.3.min.js?ver=1"></script>
<![endif]-->
<!--[if (gte IE 9) | (!IE)]><!-->
<script type="text/javascript" src="assets/js/jquery-2.1.4.min.js?ver=1"></script>
<!--<![endif]-->

<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.flexslider-min.js"></script>
<script type="text/javascript" src="assets/js/jquery.appear.js"></script>
<script type="text/javascript" src="assets/js/jquery.plugin.js"></script>
<script type="text/javascript" src="assets/js/jquery.countdown.js"></script>
<script type="text/javascript" src="assets/js/jquery.waypoints.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="assets/js/toastr.min.js"></script>
<script type="text/javascript" src="assets/js/startuply.js"></script>
</body>
</html>

gallery_.php

<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  
  // load viewer library
  $libraryPath = 'cms/lib/viewer_functions.php';
  $dirsToCheck = array('/home/thth3571/public_html/','','../','../../','../../../');
  foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
  if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

  // load records from 'gallery2'
  list($gallery2Records, $gallery2MetaData) = getRecords(array(
    'tableName'   => 'gallery2',
    'loadUploads' => true,
    'allowSearch' => false,
  ));

?>

<!doctype html>
<html lang="en">
<head>

<meta charset="utf-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Home</title>
<meta name="description" content="Startups template">
<meta name="keywords" content="Startups template">
<link rel="shortcut icon" href="assets/img/favicon.ico">
<link rel="apple-touch-icon" href="assets/img/apple-touch-icon.jpg">
<link rel="apple-touch-icon" sizes="72x72" href="assets/img/apple-touch-icon-72x72.jpg">
<link rel="apple-touch-icon" sizes="114x114" href="assets/img/apple-touch-icon-114x114.jpg">
    
    
<!-- Magnific Popup core CSS file -->
<link rel="stylesheet" href="http://www.thenelunefoundation.org/new/assets/magnific-popup/magnific-popup.css">

<!-- jQuery 1.7.2+ or Zepto.js 1.0+ -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

<!-- Magnific Popup core JS file -->
<script src="http://www.thenelunefoundation.org/new/assets/magnific-popup/jquery.magnific-popup.js"></script>    
    
    
<link rel="stylesheet" type="text/css" href="assets/css/custom-animations.css" />
<link rel="stylesheet" type="text/css" href="assets/css/lib/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />

<!--[if lt IE 9]>
<script src="assets/js/html5shiv.js"></script>
<script src="assets/js/respond.min.js"></script>
<![endif]-->
</head>

<body id="blog-page" class="products-page">
<!-- Preloader -->
<div class="preloader-mask">
<div class="preloader"><div class="spin base_clr_brd"><div class="clip left"><div class="circle"></div></div><div class="gap"><div class="circle"></div></div><div class="clip right"><div class="circle"></div></div></div></div>
</div>

<!-- Header -->
<header>
<nav class="navigation navigation-header relative-header background-header">
<div class="container">
<div class="navigation-brand">
<div class="brand-logo">
<a href="index.html" class="logo"></a><a href="index.html" class="logo logo-alt"></a>
</div>
</div>
<button class="navigation-toggle">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button> <div class="navigation-navbar collapsed">
<ul class="navigation-bar navigation-bar-left">
<li><a href="#about">About</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#sponsors">Sponsors</a></li>
                        <li><a href="news.php">News</a></li>
                        <li><a href="events.php">Events</a></li>
                        <li><a href="gallery.php">Gallery</a></li>
                        <li><a href="contact.php">Contact</a></li>
</ul>
<ul class="navigation-bar navigation-bar-right">
<li><a href="howtohelp.php">How to help</a></li>
<li class="featured"><a class="btn btn-sm btn-outline" href="donate.php">Donate</a></li>
</ul>
</div>
</div>
</nav>
</header>


    <div class="container">
<h3 class="highlight">GALLERY</h3>                
<br>

<div class="product-list row list-view">

<?php foreach ($gallery2Records as $record): ?>
<div class="product col-md-12">
<div class="product-inner">
                
<div class="product-image-wrapper">
<h5 class="nomargin"><?php echo htmlencode($record['category']) ?> - <?php echo htmlencode($record['subcategory']) ?></h5>
<p class="gallery_desc">Date: <?php echo date("D, M jS, Y g:i:s a", strtotime($record['date'])) ?><br/>
Location: <?php echo htmlencode($record['location']) ?><br/>
Photographer credit: <?php echo htmlencode($record['photographer_credit']) ?><br><br>
<?php echo htmlencode($record['comments']) ?></p>
</div>  
   
<div class="product-category">
<div class="gallery">
<?php foreach ($record['photos'] as $index => $upload): ?>
<span class="recent-posts-item-image">
<a href="<?php echo $upload['urlPath'] ?>" title="<?php echo htmlencode($record['photographer_credit']) ?>"><img src="<?php echo $upload['urlPath'] ?>" height="100" /></a>
</span>
<?php endforeach ?>
</div>
</div>
      
       <script type="text/javascript">
$('.gallery').each(function() { // the containers for all your galleries
    $(this).magnificPopup({
        delegate: 'a', // the selector for gallery item
        type: 'image',
        gallery: {
          enabled:true
        }
    });
});
    </script>



</div>
                </div>
<?php endforeach ?>




            
            


</div>
                
                
                </div>     
        
        
        
        
        





</div>
</div>




<footer id="footer" class="footer light-text">
<div class="container">
<div class="footer-content row">
<div class="col-sm-3 col-xs-12">
                
<ul class="list-unstyled">
<p>The NELUNE Foundation<br>
PO Box 1033,<br>
Spit Junction 2088 NSW</p>
<p><strong>Media Enquiries:</strong><br>
Marketing Manager<br>
NELUNE Foundation<br>
<a href="mailto:info@thenelunefoundation.org">info@thenelunefoundation.org</a><br>
02 8082 8199<br></p>

<div class="social-wrap">
<ul class="list-inline socials">
<li><a href="https://www.facebook.com/nelunefoundation/"><span class="icon icon-socialmedia-08"></span></a></li>
<li><a href="http://twitter.com/NeluneR"><span class="icon icon-socialmedia-07"></span></a></li>
<li><a href="http://www.youtube.com/channel/UCVutWJqVU8Jw0-U7MZOiAQg?feature=watch"><span class="icon icon-socialmedia-29"></span></a></li>
</ul>
</div>
          
                
                

</div>

<!--
<div class="col-sm-4 col-xs-12 border">
<a href="#about">About</a><br>
<a href="howtohelp.php">How to help</a><br>
<a href="donate.php">Donate</a><br>
<a href="#projects">Projects</a><br>
<a href="#sponsors">Sponsors</a><br>
<a href="news.php">News</a><br>
<a href="events.php">Events</a><br>
<a href="gallery.php">Gallery</a><br>
<a href="contact.php">Contact</a><br>
</div>

                
<div class="col-sm-3 col-xs-12">
</div>
-->
                
                
</div>
</div>
        
        
<div class="copyright">© <script type="text/javascript">
  document.write(new Date().getFullYear());
</script> The NELUNE Foundation. All rights reserved</div>
</footer>

<div class="back-to-top"><i class="fa fa-angle-up fa-3x"></i></div>

<!--[if lt IE 9]>
<script type="text/javascript" src="assets/js/jquery-1.11.3.min.js?ver=1"></script>
<![endif]-->
<!--[if (gte IE 9) | (!IE)]><!-->
<script type="text/javascript" src="assets/js/jquery-2.1.4.min.js?ver=1"></script>
<!--<![endif]-->

<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.flexslider-min.js"></script>
<script type="text/javascript" src="assets/js/jquery.appear.js"></script>
<script type="text/javascript" src="assets/js/jquery.plugin.js"></script>
<script type="text/javascript" src="assets/js/jquery.countdown.js"></script>
<script type="text/javascript" src="assets/js/jquery.waypoints.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="assets/js/toastr.min.js"></script>
<script type="text/javascript" src="assets/js/startuply.js"></script>
</body>
</html>

Gallery categories schema

<?php /* This is a PHP data file */ if (!@$LOADSTRUCT) { die("This is not a program file."); }
return array (
  '_detailPage' => '',
  '_disableAdd' => '0',
  '_disableErase' => '0',
  '_disableView' => '1',
  '_filenameFields' => 'title',
  '_hideRecordsFromDisabledAccounts' => '0',
  '_listPage' => '',
  '_maxRecords' => '',
  '_maxRecordsPerUser' => '',
  '_tableName' => 'gallery_categories',
  'listPageFields' => 'dragSortOrder, title',
  'listPageOrder' => 'dragSortOrder DESC',
  'listPageSearchFields' => '_all_',
  'menuName' => 'Gallery categories',
  'menuOrder' => 1478666474,
  'menuType' => 'multi',
  'num' => array(
    'order' => '1',
    'type' => 'none',
    'label' => 'Record Number',
    'isSystemField' => '1',
  ),
  'createdDate' => array(
    'order' => '2',
    'type' => 'none',
    'label' => 'Created',
    'isSystemField' => '1',
  ),
  'createdByUserNum' => array(
    'order' => '3',
    'type' => 'none',
    'label' => 'Created By',
    'isSystemField' => '1',
  ),
  'updatedDate' => array(
    'order' => '4',
    'type' => 'none',
    'label' => 'Last Updated',
    'isSystemField' => '1',
  ),
  'updatedByUserNum' => array(
    'order' => '5',
    'type' => 'none',
    'label' => 'Last Updated By',
    'isSystemField' => '1',
  ),
  'dragSortOrder' => array(
    'order' => '6',
    'label' => 'Order',
    'type' => 'none',
  ),
  'title' => array(
    'order' => '7',
    'label' => 'Title',
    'type' => 'textfield',
    'defaultValue' => '',
    'description' => '',
    'fieldWidth' => '',
    'isPasswordField' => '0',
    'isRequired' => '1',
    'isUnique' => '0',
    'minLength' => '',
    'maxLength' => '',
    'charsetRule' => '',
    'charset' => '',
  ),
);
?>

Gallery schema

<?php /* This is a PHP data file */ if (!@$LOADSTRUCT) { die("This is not a program file."); }
return array (
  '_detailPage' => '/new/gallery_.php',
  '_disableAdd' => '0',
  '_disableErase' => '0',
  '_disableModify' => '0',
  '_disablePreview' => '0',
  '_disableView' => '1',
  '_filenameFields' => 'category, subcategory',
  '_hideRecordsFromDisabledAccounts' => '0',
  '_indent' => '0',
  '_listPage' => '',
  '_maxRecords' => '',
  '_maxRecordsPerUser' => '',
  '_perPageDefault' => '25',
  '_previewPage' => '',
  '_requiredPlugins' => '',
  '_tableName' => 'gallery2',
  'listPageFields' => 'dragSortOrder, Category, subcategory',
  'listPageOrder' => 'dragSortOrder DESC',
  'listPageSearchFields' => '_all_',
  'menuHidden' => '0',
  'menuName' => 'Gallery',
  'menuOrder' => '0000000020',
  'menuType' => 'multi',
  'num' => array(
    'order' => 1,
    'type' => 'none',
    'label' => 'Record Number',
    'isSystemField' => '1',
  ),
  'createdDate' => array(
    'order' => 2,
    'type' => 'none',
    'label' => 'Created',
    'isSystemField' => '1',
  ),
  'createdByUserNum' => array(
    'order' => 3,
    'type' => 'none',
    'label' => 'Created By',
    'isSystemField' => '1',
  ),
  'updatedDate' => array(
    'order' => 4,
    'type' => 'none',
    'label' => 'Last Updated',
    'isSystemField' => '1',
  ),
  'updatedByUserNum' => array(
    'order' => 5,
    'type' => 'none',
    'label' => 'Last Updated By',
    'isSystemField' => '1',
  ),
  'category' => array(
    'order' => '6',
    'label' => 'Category',
    'type' => 'list',
    'defaultValue' => '',
    'fieldPrefix' => '',
    'description' => '',
    'isRequired' => '0',
    'isUnique' => '0',
    'listType' => 'pulldown',
    'optionsType' => 'table',
    'optionsTablename' => 'gallery_categories',
    'optionsValueField' => 'title',
    'optionsLabelField' => 'title',
  ),
  'dragSortOrder' => array(
    'order' => 7,
    'label' => 'Order',
    'type' => 'none',
  ),
  'subcategory' => array(
    'order' => '8',
    'label' => 'Sub category',
    'type' => 'textfield',
    'defaultValue' => '',
    'fieldPrefix' => '',
    'description' => '',
    'fieldWidth' => '',
    'isPasswordField' => '0',
    'isRequired' => '1',
    'isUnique' => '0',
    'minLength' => '',
    'maxLength' => '',
    'charsetRule' => '',
    'charset' => '',
  ),
  'date' => array(
    'order' => 9,
    'label' => 'Date',
    'type' => 'date',
    'fieldPrefix' => '',
    'description' => '',
    'isRequired' => '0',
    'isUnique' => '0',
    'defaultDate' => '',
    'defaultDateString' => '2016-01-01 00:00:00',
    'showTime' => '0',
    'showSeconds' => '0',
    'use24HourFormat' => '0',
    'yearRangeStart' => '',
    'yearRangeEnd' => '',
  ),
  'location' => array(
    'order' => 10,
    'label' => 'Location',
    'type' => 'textfield',
    'defaultValue' => '',
    'fieldPrefix' => '',
    'description' => '',
    'fieldWidth' => '',
    'isPasswordField' => '0',
    'isRequired' => '0',
    'isUnique' => '0',
    'minLength' => '',
    'maxLength' => '',
    'charsetRule' => '',
    'charset' => '',
  ),
  'photographer_credit' => array(
    'order' => 11,
    'label' => 'Photographer credit',
    'type' => 'textfield',
    'defaultValue' => '',
    'fieldPrefix' => '',
    'description' => '',
    'fieldWidth' => '',
    'isPasswordField' => '0',
    'isRequired' => '0',
    'isUnique' => '0',
    'minLength' => '',
    'maxLength' => '',
    'charsetRule' => '',
    'charset' => '',
  ),
  'comments' => array(
    'order' => 12,
    'label' => 'Comments',
    'type' => 'textbox',
    'defaultContent' => '',
    'fieldPrefix' => '',
    'description' => '',
    'isRequired' => '0',
    'isUnique' => '0',
    'minLength' => '',
    'maxLength' => '',
    'fieldHeight' => '',
    'autoFormat' => '1',
  ),
  'photos' => array(
    'order' => 13,
    'label' => 'Photos',
    'type' => 'upload',
    'fieldPrefix' => '',
    'description' => '',
    'isRequired' => '0',
    'allowedExtensions' => 'gif,jpg,png,wmv,mov,swf,pdf',
    'checkMaxUploadSize' => '1',
    'maxUploadSizeKB' => '5120',
    'checkMaxUploads' => '1',
    'maxUploads' => '25',
    'resizeOversizedImages' => '1',
    'maxImageHeight' => '800',
    'maxImageWidth' => '600',
    'createThumbnails' => '1',
    'maxThumbnailHeight' => '150',
    'maxThumbnailWidth' => '150',
    'createThumbnails2' => '0',
    'maxThumbnailHeight2' => '150',
    'maxThumbnailWidth2' => '150',
    'createThumbnails3' => '0',
    'maxThumbnailHeight3' => '150',
    'maxThumbnailWidth3' => '150',
    'createThumbnails4' => '0',
    'maxThumbnailHeight4' => '150',
    'maxThumbnailWidth4' => '150',
    'useCustomUploadDir' => '0',
    'customUploadDir' => '',
    'customUploadUrl' => '',
    'infoField1' => '',
    'infoField2' => '',
    'infoField3' => '',
    'infoField4' => '',
    'infoField5' => '',
  ),
);
?>

By ross - November 11, 2016

Thanks for posting your files.

I have two recommendations.

1. On your gallery_.php page, look for 

'allowSearch' => false,

and change it to:

'allowSearch' => true,

That will let you link to gallery_.php with variables in the URL like: gallery_.php?gallery=gallery

2. In your gallery schema, change the "Use this field for option values" for your "Category" drop down to "num" instead of title. This change gets made in CMS Builder (don't just edit your schema).

That should get you sorted out.

Let me know how you make out.

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Fantastic! I updated the link code for the gallery categories to the below and now it all works perfectly. Thanks for your help :)

<?php foreach ($gallery2Records as $record): ?>
<li><a href="gallery_.php?category=<?php echo $record['category'] ?>"><?php echo $record['category'] ?></a></li>
<?php endforeach ?>