Hi and thanks, I want to view images in a local fs on a web page so i have: <dtml-with images> <dtml-in images start=0 size=50 orphan=0 reverse> <img src="<dtml-var "(THE IMAGE ID'S)">"><br> </dtml-in> </dtml-with> I've read that I can get the filenames as id's by using getObject, but I can't seem to make it work. Tom Scheidt | www.falsemirror.com | tom@falsemirror.com ---------------------------------------------------------------------------- -----------
I've read that I can get the filenames as id's by using getObject, but I can't seem to make it work.
Try this: <dtml-with images> <dtml-in fileIds start=0 size=50 orphan=0 reverse> <img src="images/<dtml-var sequence-item>"><br> </dtml-in> </dtml-with> --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998
I'm just getting started, but managed to use the following to display only JPG's, and then only ones starting with "tn_" (my thumbnails): <ul> <dtml-in "tester.fileValues()"> <dtml-if "type=='image/jpeg'"> <dtml-if "id[0:3]=='tn_'"> <img src="<dtml-var "parent.id">/<dtml-var url>"> </dtml-if> </dtml-if> </dtml-in> </ul> (my localfs instance is called "tester" and is in the same folder with the dtml page containing this code) Karl
I'm just getting started, but managed to use the following to display only JPG's, and then only ones starting with "tn_" (my thumbnails):
There's an easier way. =) <ul> <dtml-in "tester.fileIds(spec='tn_*.jpg')"> <img src="tester/<dtml-var sequence-item>"> </dtml-in> </ul> --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998
participants (3)
-
Jonothan Farr -
Karl Ulbrich -
Tom Scheidt