Photo Gallery- next/prev links not displaying images

17 posts by 2 authors in: Forums > CMS Builder
Last Post: September 22, 2011   (RSS)

By csdesign - September 9, 2011

Hello! I know this is a big fat user error on my part. Help would be really appreciated!

I have two editors for this gallery page:
"bird_photography_gallery" (single record for title & top-of-page description, title & content fields only)

"bird_photos" (multi-record for photos includes 'title' as the photo title, 'content' as the photo description & then tags/keywords)

I've set the page to display 2 images per page just for testing purposes. I'm been working on it for a while now and each time I get the "next/previous" images to work, then something else breaks.

I do not have any viewer urls defined in the section editors.

Here's the page link: "click on NEXT" and it goes to a blank page:
http://www.billdraker.com/cmsAdmin/bird-photography.php

I've also attached the php file. Thanks! Tina
Attachments:

bird-photography.php 7K

Re: [gkornbluth] Photo Gallery- next/prev links not displaying images

By csdesign - September 13, 2011

Thanks Jerry!!

All I had to do was remove the line you suggested and it works perfect! :)

'where' => whereRecordNumberInUrl(1),

Re: [gkornbluth] Photo Gallery- next/prev links not displaying images

By csdesign - September 13, 2011

In addition to that... how would I go about having the "content" (top of page description) to display only on the 1st page - not on every single gallery page (accessed via the prev/next feature)

This page is a combination of two section editors "bird_photography_gallery" is a single record that contains just the title & content (gallery description).

The "bird_photos" editor is the multi-record photo gallery.

this is the script that pulls in the "content" (gallery description) and I want it to appear ONLY on the 1st page of the gallery.

<?php echo $bird_photography_galleryRecord['content'] ?>

page online:
http://www.billdraker.com/cmsAdmin/bird-photography.php

Thanks!!! Tina

Re: [csdesign] Photo Gallery- next/prev links not displaying images

By gkornbluth - September 13, 2011

Hi Tina,

You might play around with wrapping your content in an if statement something like:
<?php echo $bird_photosMetaData['page'] == 1 ?>
<?php echo $bird_photography_galleryRecord['content'] ?>
<?php endif ?>


(if that doesn't work try 0 instead of 1. I'm not sure if the page count starts at 1 or 0)

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Photo Gallery- next/prev links not displaying images

By csdesign - September 13, 2011

Thanks for the reply Jerry!

I tried the code: (tried 0, 1 & even 2)

<?php echo $bird_photosMetaData['page'] == 1 ?>
<?php echo $bird_photography_galleryRecord['content'] ?>
<?php endif ?>

I get this error:
Parse error: syntax error, unexpected T_ENDIF in /home/billd3/public_html/cmsAdmin/bird-photography.php on line 51

<?php endif ?> is line 51

Re: [csdesign] Photo Gallery- next/prev links not displaying images

By gkornbluth - September 13, 2011

Of course you got an error, and it's my fault. I copies the wrong line of code and didn't look closely enough at it.

the first line of code should be an if statement.

something like:

<?php if ($bird_photosMetaData['prevPage'] == 1): ?>

Sorry,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Photo Gallery- next/prev links not displaying images

By csdesign - September 13, 2011

I knew it had to be along the lines of an if this... then this statement but my brain is just scattered right now. It brought up just the second page with the content so I changed it to 0 like you suggest and it's perfect. Thanks a ton!! :)

Re: [csdesign] Photo Gallery- next/prev links not displaying images

By gkornbluth - September 13, 2011

Glad it worked

Really Nice Looking Site...


Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Photo Gallery- next/prev links not displaying images

By csdesign - September 13, 2011

Thanks!! Just a few more touches including a slideshow on the homepage so I might be back on the forum for a little help with that but I'm going to try to tackle it on my own. :)

Thanks again - your help is really appreciated :)