Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

None article files.

I have a bunch of .jpg files I want to quickly throw onto a website.  I assume it's not possible to use a loop to identify each file (non-article) in a folder and create an entry for each in a loop?

E.g Sub folder contains:


I want to do:

for each x in SubFolder
  <img src="pic1.jpg"> - x.filename

(using pidgen city desk script there.... <grin>)

Chris Rudram
Tuesday, June 29, 2004

CityScript loops currently only work with articles.  You can put each image in a field, like extra1, and place the image where you want by pulling out extra1 using the loop.

Or, if you have PHP on the site, you can use the new gallery template in the CityDesk templates area.

David Burch
Tuesday, June 29, 2004

What I do in this situation is create an article with the same name as the JPG. The body of the article contains the caption. The template has the code to display it:

caption: {$x.body$}
image: src="{$x.filename$}.jpg"


David Watts
Wednesday, June 30, 2004

Thats what I did in the end, but for a thumbnail gallery of 70-odd pictures, it wasn't the ideal solution.

I don't -really- want to use PHP (and learn all that jazz).

It is 'a would be very nice to have' if City Desk was expanded to allow some sort of Gallery functionality.... in a ideal world it would take a bunch of pictures, generate thumbnails and publish them, and allow the user to add the necessary caption text in a simple manner.

Currently I can do it, it's just not as smooth as I'd like.

Anyways, thanks, just chekcing there was no short cut I'd missed.

Chris Rudram
Sunday, July 4, 2004

If you want  to publish only a couple of pictures, why not use an album generator? I'd recommend JAlbum (


Janek Schwarz
Monday, July 5, 2004

*  Recent Topics

*  Fog Creek Home