Skip to main content
Known Participant
August 19, 2010
Question

Showing multiple images

  • August 19, 2010
  • 1 reply
  • 448 views

Hi

I have posted this question before but need some more help.

I have  a number of different products to show on a website each product will have a different number of images.

I need to create a .asp page that would cater for showing all the different images associated with it.

I was told that i would need to create a repeat region that loops through all of the image paths.

Can anybody help me with acheiving this as i do not really know where to start.

Thanks

John

This topic has been closed for replies.

1 reply

Lawrence_Cramer
Inspiring
August 19, 2010

Hi John,

The right way to do this is to create an "images" table in the database. In this table you'll store an image ID, the image file name, the product ID of the product each image is associated with, and if you like a sort order field where you can enter the order in which you want the images to appear.

Next you query your database for a product and then run a second query to get your images using the Product ID as your key field in your WHERE statement - then loop throught the results of this query.

Setting things up this way will allow an unlimited number of images to be associated with each product.

--
Lawrence Carmer - *Adobe Community Professional*
http://www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and ColdFusion

Stay updated - http://blog.cartweaver.com

peppsAuthor
Known Participant
August 19, 2010

Hi Thanks for the help

would you happen to have an example of code for this, as i have taken over this site from someone and only have experiance in using the tools supplied with Dreamweaver to do this.

I have very little knowledge of doing this purely through writing code.

Thanks again

john