Zen coding img src from a list

Go To StackoverFlow.com

4

I'm trying to create a large list of img tags from a list of filenames using zen coding to fill the src attribute with my list of filenames.

Here's what I have and what I want to do with it:

filenameA.jpg
someotherone.jpg
anotherimage.jpg
sample.jpg

Zen coding results:

<img src="images/filenameA.jpg" />
<img src="images/someotherone.jpg" />
<img src="images/anotherimage.jpg" />
<img src="images/sample.jpg" />

I've tried wrapping the list with abbreviation: img[src=] but I don't know the proper way to do it.

Thanks for the help :)

2012-04-03 21:15
by Tony


5

Try this abbreviation (works in Zen Coding v0.7):

img[src=images/$#]*

2012-04-04 07:37
by Sergey Chikuyonok
Ads