Hi pimpsuit.
The question is if this is the right way to do what i'm doing or if there is a better way.
Main Topics
Browse All TopicsHello experts.
I want to use the jquery prettyphot plugin:http://www.no-margi
with coldfusion.
I have a result page with n records and for each record one thumb.clicking on the thumb i open the lightbox with all the images of the specific item.
I have this code:
<div id="mygallery_1" class="gallery clearfix">
<a href="images/fullscreen/1.
<a href="images/fullscreen/2.
<a href="images/fullscreen/3.
</div>.
Trying to simulate this dynamic with coldfusion i made the result page below.
I don't know if it is the best way or if i could do f.e send the WADAdboartikel.Art_ID clicking on the image (<img src="../images/thumbs/#get
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The query below would get all the images for your getting information from the artikel table as well as the all_images table.
The cfoutput would group the images by art_id from the artikel table into individual galleries.
Looking at it again : You could probably do this with one query against the all_images table if you don't need anything from the artikel table.
Hi again.
Looking at your code it seems there is missing the cfloop opening tag and cfoutput closing tag.
The next problem is that if i will use this code i will show all the images.
In my code the getimage query is getting the image with img_1= 1(Mainphoto) that i'm showing.
The All_images query is getting the data of the rest of the images .By clicking on the mainphoto jquery is creating the lightbox.
I do need things from the artikel table like the Herstellers_ID but i think that would not be a problem to use the group function.
I hope you can contact with me in the next 7 hours!
I got it:
<cfset galleryCount = 0 />
<cfoutput query="qImages" group="art_id">
<cfset galleryCount = galleryCount +1 />
<cfoutput>
<div class="gallery clearfix">
<a href="../images/bigsize/#q
</div>
</cfoutput>
</cfoutput>
The problem that remains is to show only the image with img_ID 1.
(I don't know if this could be done showing the main image in the <div class="gallery clearfix">,than clicking on the image pass the art_Id (ajax - bind function) to another page with the getAllimages query(i have above) and get the output in the div.It seems too complicated!)
Sorry about the <cfoutput></cfloop> typo ;)
You probably want something like the attached code.
The records in the query are sorted by art_id and then img_id, so when there is a new art_id the first record should also be img_id 1. (make sure you do have an img_id 1 for each art_id)
Its hard to tell exactly what you need from your original code and I've never used prettyPhoto, so it might not be exactly what you're after, but hopefully it should be about right and give you something to work with.
It is close to the solution.
I must have all the links into the div class="gallery clearfix" to work:
<div class="gallery clearfix">
<cfset galleryCount = galleryCount +1 />
<cfoutput>
<cfif qImages.img_id EQ 1>
<!--- Output your link image for the gallery --->
<a href="../images/bigsize/#q
<!--- Now start the gallery ---->
<a href="../images/bigsize/#q
<cfelse>
<!--- Just add the image to the gallery --->
<a href="../images/bigsize/#q
</cfif>
</cfoutput>
<!--- New art_id so close the gallery div for this art id --->
</div>
The problem is that i have now for every record the image with img_id 1 twice in the lightbox.(remember the allimages query had :....AND img_id NOT LIKE <cfqueryparam cfsqltype="cf_sql_numeric"
Business Accounts
Answer for Membership
by: pimpsuitPosted on 2009-09-09 at 08:34:19ID: 25292366
What is your question/problem?