Sub Detail page for images

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

By gkornbluth - September 19, 2009

Hi all,

It’s been a really long day, my mind is not working very well and I’m stumped again.

I’ve set up a list page that shows a series of photo galleries.

Clicking on a list page entry takes the visitor to a detail page that shows a series of thumbnails from that specific gallery.

I want to set up a sub, detail page for each one of the thumbnails in the gallery so that when a thumbnail is clicked on the visitor is taken to a new detail page with a larger version of that specific image and a bunch of information about that image.

Don’t know why I’m having such a hard time with this, but I’d sure appreciate some help.

I just know the solution is going to be both simple and obvious when I get to it.

Thanks,

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] Sub Detail page for images

By Chris - September 19, 2009

Hi Jerry,

Can you please post the PHP source code for the detail page that shows a series of thumbnails from a specific gallery?
All the best,
Chris

Re: [chris] Sub Detail page for images

By gkornbluth - September 19, 2009 - edited: September 22, 2009

Chris,

Thanks for this.

Each guide_dog_images record has a group code, (this group is called Rob) one image upload and a few descriptive text fields.

I’d like to be able to show the larger version of the image and some of the descriptive text when someone clicks on the thumbnail.

The current code in the first detail page is:

In the head:

list($guide_dog_imagesRecords, $guide_dog_imagesMetaData) = getRecords(array(
'tableName' => 'guide_dog_images',
));


And in the body:

<table cellpadding="10">
<tr>
<?php foreach ($guide_dog_imagesRecords as $record): ?>
<?php foreach ($record['image'] as $upload): ?>
<td width="125" height="125" bgcolor="#C0BCB3" align="center" valign="middle">
<a href="<?php foreach ($guide_dog_name_detailsRecords as $record): ?><?php echo $record['_link'] ?><?php endforeach; ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>" alt="" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight']?>" border="0" style="margin-bottom: 5px" /></a>
<?php $maxCols=7; if (@++$count % $maxCols == 0): ?>
</tr>
<tr>
<?PHP endif; ?>
<?php endforeach ?>
<?php endforeach; ?>
</tr>
</table>



I know that the code for the _link is not going to get me where I need to go, but I don’t know what to replace it with and what other code is needed.

Best,

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] Sub Detail page for images

By Chris - September 21, 2009

Hi Jerry,

Where does $guide_dog_name_detailsRecords get set?

Also, are you uploading multiple images per guide_dog_images record, or is there one image uploaded per record?
All the best,
Chris

Re: [gkornbluth] Sub Detail page for images

By Chris - September 21, 2009

Hi Jerry,

One image per guide_dog_images record? Perfect! :)

You'll want to use the '_link' for the guide_dog_images record, then supply a Detail Page URL for that section.

For example:

<table cellpadding="10">
<tr>
<?php foreach ($guide_dog_imagesRecords as $record): ?>
<?php foreach ($record['image'] as $upload): ?>
<td width="125" height="125" bgcolor="#C0BCB3" align="center" valign="middle">
<a href="<?php echo $record['_link'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>" alt="" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight']?>" border="0" style="margin-bottom: 5px" /></a>
<?php $maxCols=7; if (@++$count % $maxCols == 0): ?>
</tr>
<tr>
<?php endif; ?>
<?php endforeach ?>
<?php endforeach; ?>
</tr>
</table>


Please let me know if you have any problems with that approach, or if you have any more questions.
All the best,
Chris

Re: [chris] Sub Detail page for images

By gkornbluth - September 21, 2009

Thanks Chris for all the time you put into this.

I don't know why I couldn't see the simplest of solutions.

I didn't define the second detail page... Duh

I really hate it when I can't I think straight!!!

It's time for a vacation.

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] Sub Detail page for images

By Chris - September 22, 2009

Hi Jerry,

No worries! Glad this worked for you. :)
All the best,
Chris