Sub Detail page for images
8 posts by 2 authors in: Forums > CMS Builder
Last Post: September 22, 2009 (RSS)
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
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
Can you please post the PHP source code for the detail page that shows a series of thumbnails from a specific gallery?
Chris
Re: [chris] Sub Detail page for images
By gkornbluth - September 19, 2009 - edited: September 22, 2009
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
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
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?
Chris
Re: [chris] Sub Detail page for images
By gkornbluth - September 21, 2009 - edited: September 22, 2009
My client trains guide dogs. Each dog goes through about a year of training. She's a photographer, so she takes many images to document the year long task.
She will soon have 10 or 15 dogs, (groups) on her list page.
Each of the detail pages has a long description of the particular dog, with maybe 100+ image thumbnails documenting the year.
When a thumbnail gets clicked on, instead of just seeing a larger image on a white background as you do now, she'd like a sub-detail page that shows a larger image of that specific thumbnail, a description of what went on when that image was taken, as well as some other info taken from the fields of the "Guide Dog Images" record.
She's been using her pbase page to accomplish the bare bones of this idea but wants to expand the concept and keep everything on her own web site.
At present, I've set up 3 editors:
1) Guide Dog Names - multi record - where the dog groups are created. A single "Title" field only. Allows client to add new groups at will.
2) Guide Dog Name Details - multi record - One record for each group. Each record contains a radio button list to specify the group name, a list page image upload field, and group description field.
3) Guide Dog Images - multi record - All image are uploaded here for all groups. One image per record. Each record contains a radio button list to specify the group name the image belongs to, a narrative field about that particular image and some other information fields.
If you need to access the editors or the site, post your e-mail address I'll send you the log in info.
Many thanks,
Jerry
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
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.
Chris
Re: [chris] Sub Detail page for images
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 [:(]
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
No worries! Glad this worked for you. :)
Chris