Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Magic Name variable/Photo blog

I would like to loop on image files without having to put each photo into an article. For instance:

{$ foreach x in (folder "images") $}
<div><img src="filename"></div>
{$ next $}

doesn't work. So, two comments/questions:

1. It would be nice for the MagicName to be a variable
2. Any one got some slick work-arounds?

Amos Satterlee
Saturday, December 07, 2002

Incorrect cityscript. Try this instead:

{$ foreach x in (folder "images") $}
<div><img src="{$$}"></div>
{$ next $}

M. C. Matti
Monday, December 09, 2002

Whoops, sorry, belay that last post ... I wrote it before my morning coffee and missed that these aren't articles.

Hmm ... not sure of a CD technique for this.

M. C. Matti
Monday, December 09, 2002

*  Recent Topics

*  Fog Creek Home