Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

for loops for images?

I want to use City Desk to create a small real estate site for a client that she can update easily. She has listings. Each listings has an image.

I'd like to create a loop that displays all the images in a certain folder, puts some captions under each one and links to the full listing.

Can City Desk do that? If so, can you post some example code?

Debra Weiss
Thursday, December 13, 2001

I did something similar by putting the image into the teaser field (you can do that), then including {$x.teaser$} in the loop.

Guan Yang
Thursday, December 13, 2001

Or just make the article only have an image in the body...

Michael Pryor
Thursday, December 13, 2001

... but then where would the "full listing" go? ;-)

Guan Yang
Thursday, December 13, 2001

Here is an example real estate site:

http://www.fogcreek.com/~mhp/RealEstate.cty

Michael Pryor
Thursday, December 13, 2001

Michael, many thanks for your example. I'm new to CityDesk and was unsure of the approach. This is quite helpful!

Debra Weiss
Thursday, December 13, 2001

Jam Anchower.  Excellent.

Chris Farmer
Thursday, December 13, 2001

Er, Jim, I mean.  Still excellent.

Chris Farmer
Thursday, December 13, 2001

Haha!
Chris,  I can't believe you caught that!

I imported the Onion to be a CityDesk site, and it took about 20 minutes...

so thats how that got in there..

Michael Pryor
Friday, December 14, 2001

*  Recent Topics

*  Fog Creek Home