Hi
I have a folder of images that are named in =the format...
random_names-XXX.jpg
Where XXX is a serial =number for a record in a database
I don't know what the ='random_names' bit is but it doesn't contain anything other than letters =an underscores. The filename always ends in hyphen serial number =.jpg
When I pull a record from the database I want to do a =listfiles on the image folder and see if one of them ends in the serial =number.
Using...
[listfiles =path=3Dimages&name=3D-[serialno].jpg&exact=3Df]
<img =src=3D"images/[filename]">
[/listfiles]
...works fine when =I have a matching image but I get an error message if there is no =matching image file like...
An unknown error =occurred:
FileNotFound
-30.jpg
I've tried hiding the =listfiles inside a showif with another listfiles but it doesn't work, =the error still shows...
[showif [listfiles =path=3Dimages&name=3D-[serialno].jpg&exact=3Df][isfile][/listfiles=]=3DT]
=[listfiles =path=3Dimages&name=3D-[serialno].jpg&exact=3Df]
<img =src=3D"images/[filename]">
=[/listfiles]
[/showif]
...I'm on WebDNA 6.0a on Mac OS =X Server 10.4.11
What am I doing wrong here? Shouldn't =[listfiles] just show nothing is it doesn't find a =match?
Paul
----------------------------------------------------=-----
This message is sent to you because you are subscribed =to
the mailing list <talk@webdna.us>.
To =unsubscribe, E-mail to: <talk-leave@webdna.us>
archi=ves: http://mail.webdna.us/l=ist/talk@webdna.us
Bug Reporting: support@webdna.us
|
Hi
I have a folder of images that are named in =the format...
random_names-XXX.jpg
Where XXX is a serial =number for a record in a database
I don't know what the ='random_names' bit is but it doesn't contain anything other than letters =an underscores. The filename always ends in hyphen serial number =.jpg
When I pull a record from the database I want to do a =listfiles on the image folder and see if one of them ends in the serial =number.
Using...
[listfiles =path=3Dimages&name=3D-[serialno].jpg&exact=3Df]
<img =src=3D"images/[filename]">
[/listfiles]
...works fine when =I have a matching image but I get an error message if there is no =matching image file like...
An unknown error =occurred:
FileNotFound
-30.jpg
I've tried hiding the =listfiles inside a showif with another listfiles but it doesn't work, =the error still shows...
[showif [listfiles =path=3Dimages&name=3D-[serialno].jpg&exact=3Df][isfile][/listfiles=]=3DT]
=[listfiles =path=3Dimages&name=3D-[serialno].jpg&exact=3Df]
<img =src=3D"images/[filename]">
=[/listfiles]
[/showif]
...I'm on WebDNA 6.0a on Mac OS =X Server 10.4.11
What am I doing wrong here? Shouldn't =[listfiles] just show nothing is it doesn't find a =match?
Paul
----------------------------------------------------=-----
This message is sent to you because you are subscribed =to
the mailing list <talk@webdna.us>.
To =unsubscribe, E-mail to: <talk-leave@webdna.us>
archi=ves: http://mail.webdna.us/l=ist/talk@webdna.us
Bug Reporting: support@webdna.us
DOWNLOAD WEBDNA NOW!
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...