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:
why is this line in GeneralStore? (1998)
sort problems....bug or brain fart? (1997)
Here we go again...WebDNA - SQL- Clustering (2006)
Re[2]: back button loses cart (2000)
Can I invoke an ssi plugin from within a webcat page (1997)
WebCommerce: Folder organization ? (1997)
WARNING: deletedb anomaly (2002)
[shownext] and descending order (1997)
WebCat2 several catalogs? (1997)
Search results templates (1996)
Mac v. NT (1998)
[WebDNA] POST method using TCPSend (2013)
Multiple Stores and WebCatalog Prefs (1997)
[WebDNA] Search Question (2009)
I'm new be kind (1997)
Where's Cart Created ? (1997)
Writing [raw] to a file (2000)
Can't load tmpl files (1997)
Possible Bug in 2.0b15.acgi (1997)
Thanks for tips, more quest (1997)