Displaying Images (not loaded into CMSB)

2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 25, 2011   (RSS)

By sidcam - May 24, 2011

My CMSB database has 20,000+ records (real estate listings) being imported into it. It is updated daily. The photos that go with the records are imported into a directory on the server (basically, "/html/mlsphotos/"). The photos are NOT loaded into the CMSB database.

I need to be able to display the photos with their corresponding record. Although the name of the photos match an existing CMSB field that is unique to each records, (i.e. <listingnumber>_1.jpg, <listingnumber>_2.jpg, etc) my problem is that every record has a unique number of photos (up to 99). So if I hardcode my page to allow for 99 photos and there's only 1, I'm displaying 98 broken/missing images.

There is a second field named <picturecount> that tells me the exact number of photos that the record has. Is there a simple way to make CMSB read the <picturecount> field and repeat a series of html to display the correct number of photos for each listing?

Thanks in advance, Sid