Previous / Next pages missing list page image

7 posts by 3 authors in: Forums > CMS Builder
Last Post: July 27, 2009   (RSS)

By Janet - August 11, 2008

Hey guys -

I've got a section on my site that only uses one list template to display information specific to each of my 8 categories. Each category uses a specific thumbnail image in the sidebar. One of those groups requires more than one page to display all the names and I can't seem to figure out how to repeat its category image without messing up the other pages.

The page is at: http://uga.edu/dev/ecology/directoryList.php?faculty_directory=Regular%20Faculty. The page in question is http://uga.edu/dev/ecology/directoryList.php?faculty_directory=Graduate%20Students. If you scroll down to go to the next page, you'll see where I lose the photo in the sidebar.

I've read some forum posts and then tried the following...

<?php
include ("/usr/www/uga/htdocs/dev/cmsAdmin/templateFiles/viewers/facultyDirectoryListViewer.php");
$options['where'] = "directory_name = '$facultyDirectory'";
list($listRows, $listDetails) = getListRows($options);
?>

<?php
$type = @$_GET['faculty_directory'];
if ($type == 'Regular Faculty' or
$type == 'Emeritus Faculty' or
$type == 'Courtesy Faculty' or
$type == 'Adjunct Faculty' or
$type == 'Conservation Faculty' or
$type == 'Postdoctoral Associates' or
$type == 'Research Staff' or
$type == 'Administrative Staff'):
?>

<?php foreach ($listRows as $record): ?>
<?php foreach (getUploads($options['tableName'], 'directory_image', $record['num']) as $upload): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="240" height="210">
<?php endforeach ?>
<?php endforeach ?>
<?php endif ?>

<?php
$type = @$_GET['faculty_directory'];
if ($type == 'Graduate Students'):
?>
<img src="images/events.jpg" title="Events image" width="240" height="211">
<?php endif ?>

...this isolated the graduate student pages and called the image (YEAH!)... but the other directory pages lost their sidebar image (boo!) :

Can you help me?

Jan

Re: [Janet] Previous / Next pages missing list page image

By Dave - August 11, 2008

Hi Jan,

I think what's happening is getListRows is trying to load page 2 of it's results because of the page 2 in the url. Try adding this (in red):

$options['where'] = "directory_name = '$facultyDirectory'";
$options['pageNum'] = "1";
list($listRows, $listDetails) = getListRows($options);

Let me know if that fixes it.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Previous / Next pages missing list page image

By Janet - August 13, 2008

Thanks for your usual quick response, Dave. That doesn't seem to do the trick. It's happening on my Events pages, too. Here's a peek: http://www.ecology.uga.edu/eventsList.php?page=1

Page 1 is fine... got my topbar menu and my sidebar category listings.
Page 2 is wonky... lost the topbar menu items that are pulling from the database and my sidebar category listings.

I suspect an answer to this would be the solution to the graduate school pages as well.

Hum....

Re: [Janet] Previous / Next pages missing list page image

By Dave - August 13, 2008

Hi Janet,

They don't seem to be showing on either page now? If you can get it back working on one page at least (even if not the other) then I can take a look and compare and see what the difference is.

Let me know and I'll take a look. Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [tsuluwerks] Previous / Next pages missing list page image

By Dave - July 27, 2009

Hi Tracy,

For the footer viewer code, try removing the line that says "where". I think what's happening is it's picking up the record number in the url. Removing the where will have it just load the first record.

Let me know if that fixes it.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Previous / Next pages missing list page image

By tsuluwerks - July 27, 2009

It works perfectly, Dave. Thanks!