Re: [isfile] ?
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 11440
interpreted = N
texte = >>>look under [listfiles] in the context tags of the online ref. It is used>>>for doing a complete directory not just a specific file unless you render>>>the folder ahead of time which is how we plan to use it.>>Until we get some new tags for file-existence checking, you can>'pre-render' the contents of a folder into a database so at least you>don't have to type new files in from memory.>>Here is some WebDNA that 'renders' all the online docs into a single>database. You can modify it to look for files of type .gif and just store>their names into a database (don't try to store the contents of a .gif>file into a database field, however -- binary information would make it>unhappy).>>>[closedatabase alldocs.db]>>[writefile alldocs.db]filename contents>[/writefile]>>[listfiles webcatalog/webcatreference]>[filename]
>[showif [filename]^.html][append>alldocs.db]filename=[filename]&contents=[url][include>file=webcatalog/webcatreference/[filename]&raw=T][/url][/append][/showif]>[/listfiles]Hi Grant,I have the following WebDNA working, but there's a problem I cannot seem toresolve. This code is supposed to show the
tag only if the file is inthe previews folder. That part works fine, but ...when the file name I'm seeking does *not* exist in the previews folder, Iwant to display a 'noPhotos.gif'. Any ideas how to do this? At first glanceI thought of using [showif [FileName]![hls]-01.gif] or [hideif[FileName]=[hls]-01.gif], but that doesn't work in this case like it doesmost every place else ... because it's inside the [listfiles] context whichis a looping context, thus the reason why an alternate solution is required...[ListFiles previews/][showif [FileName]=[hls]-01.gif]
[/showif][/ListFiles]Sincerely, Ken Grome ..... ken@iav.comhttp://usarea.net/home.html
Associated Messages, from the most recent to the oldest:
>>>look under
[listfiles] in the context tags of the online ref. It is used>>>for doing a complete directory not just a specific file unless you render>>>the folder ahead of time which is how we plan to use it.>>Until we get some new tags for file-existence checking, you can>'pre-render' the contents of a folder into a database so at least you>don't have to type new files in from memory.>>Here is some WebDNA that 'renders' all the online docs into a single>database. You can modify it to look for files of type .gif and just store>their names into a database (don't try to store the contents of a .gif>file into a database field, however -- binary information would make it>unhappy).>>>[closedatabase alldocs.db]>>[writefile alldocs.db]filename contents>[/writefile]>>[listfiles webcatalog/webcatreference]>[filename]
>[showif [filename]^.html][append>alldocs.db]filename=[filename]&contents=
[url][include>file=webcatalog/webcatreference/[filename]&raw=T][/url][/append][/showif]>[/listfiles]Hi Grant,I have the following WebDNA working, but there's a problem I cannot seem toresolve. This code is supposed to show the
tag only if the file is inthe previews folder. That part works fine, but ...when the file name I'm seeking does *not* exist in the previews folder, Iwant to display a 'noPhotos.gif'. Any ideas how to do this? At first glanceI thought of using [showif [FileName]![hls]-01.gif] or [hideif[FileName]=[hls]-01.gif], but that doesn't work in this case like it doesmost every place else ... because it's inside the
[listfiles] context whichis a looping context, thus the reason why an alternate solution is required...[ListFiles previews/][showif [FileName]=[hls]-01.gif]
[/showif][/ListFiles]Sincerely, Ken Grome ..... ken@iav.comhttp://usarea.net/home.html
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
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...
Related Readings:
Rhapsody? (1997)
Word Breaks (1998)
Nested tags count question (1997)
Server crash (1997)
2.1 Stuff (1998)
Country & Ship-to address & other fields ? (1997)
[WebDNA] end of file append (2017)
url value (2002)
billing system (2003)
[WebDNA] isnumeric (2015)
What am I doing wrong? (2000)
Closing Databases (1998)
emailer w/F2 (1997)
Still no word on my problems. . . (2000)
WebCat2b12plugin - [search] is broken ... not! (1997)
I have observed and I am gone. (1998)
[HIDEIF] inside [FOUNDITEM] (1997)
Multiple 'Users.db' files not possible (1997)
service stop and restart (1997)
(1997)