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: [Dave] Previous / Next pages missing list page image

By tsuluwerks - July 26, 2009

I am having a similar problem. I have two pages on a site under development that call multiple tables to display information. The URLS:
http://www.tuttobellainc.com/colorcards.php
http://www.tuttobellainc.com/gallery.php

On the first page, all of the elements are showing up great. As soon as detail on another item from the list is selected, the footer information disappears from the bottom of the page.

I think it's because the page is set up to only show 1 list item from one of the tables. I think that it is then ignoring all of the table queries after that.

Do you have a recommendation on how to fix this issue?

Thanks,
Tracy

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

By tsuluwerks - July 27, 2009

It works perfectly, Dave. Thanks!