Re: [isfile] ?

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 11442
interpreted = N
texte = >I have the following WebDNA working, but there's a problem I cannot seem to >resolve. This code is supposed to show the tag only if the file is in >the previews folder. That part works fine, but ... > >when the file name I'm seeking does *not* exist in the previews folder, I >want to display a 'noPhotos.gif'. Any ideas how to do this? Never mind, I just came up with a solution! :) [ListFiles previews/] [showif [FileName]=[hls].gif] [/showif] [/ListFiles][hideif [ListFiles previews/][FileName][/ListFiles]^[hls].gif] [/hideif] The first section makes the [listfiles] context display only the file with the name [hls].gif, and if there's no file with that name, it displays nothing.The second part deals with the situation when there's no file with that name. It hides the none.gif image tag except when the first section displays nothing.Yes, I did it! :) I'm happy, can you tell?This one wasn't all that easy for me to figure out, but I did it and it works. Now all I have to do is add new files to the previews folder, and WebCat2 will either create the image tags for those files, or else it will create an image tag for the 'none.gif' file I want to display when the proper image file is not found.Sincerely, Ken Grome ..... ken@iav.com http://usarea.net/home.html Associated Messages, from the most recent to the oldest:

    
  1. Re: [isfile] ? (Grant Hulbert 1997)
  2. Re: [isfile] ? (Christer Olsson 1997)
  3. Re: [isfile] ? (Grant Hulbert 1997)
  4. Re: [isfile] ? (Kenneth Grome 1997)
  5. Re: [isfile] ? (Christer Olsson 1997)
  6. Re: [isfile] ? (Kenneth Grome 1997)
  7. Re: [isfile] ? (Kenneth Grome 1997)
  8. Re: [isfile] ? (Grant Hulbert 1997)
  9. Re: [isfile] ? (Kenneth Grome 1997)
  10. Re: [isfile] ? (grichter@panavise.com (Gary Richter) 1997)
  11. [isfile] ? (Kenneth Grome 1997)
>I have the following WebDNA working, but there's a problem I cannot seem to >resolve. This code is supposed to show the tag only if the file is in >the previews folder. That part works fine, but ... > >when the file name I'm seeking does *not* exist in the previews folder, I >want to display a 'noPhotos.gif'. Any ideas how to do this? Never mind, I just came up with a solution! :) [ListFiles previews/] [showif [FileName]=[hls].gif] [/showif] [/ListFiles][hideif [ListFiles previews/][FileName][/ListFiles]^[hls].gif] [/hideif] The first section makes the [listfiles] context display only the file with the name [hls].gif, and if there's no file with that name, it displays nothing.The second part deals with the situation when there's no file with that name. It hides the none.gif image tag except when the first section displays nothing.Yes, I did it! :) I'm happy, can you tell?This one wasn't all that easy for me to figure out, but I did it and it works. Now all I have to do is add new files to the previews folder, and WebCat2 will either create the image tags for those files, or else it will create an image tag for the 'none.gif' file I want to display when the proper image file is not found.Sincerely, Ken Grome ..... ken@iav.com http://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:

WebCat Problem? (1999) Re:trouble (1997) Correction: New WebDNA Example from Olin -- (1998) Firesite and WebCat (1999) Loosing Quantity (2000) How do you TEAM Code? (2004) build a select list from a db search (2004) Passing Cart variable to subdirectory files? (1997) page redirect in webDNA (1997) background (2001) Search Command, multiple dbs, etc. --further elucidation needed (2000) Founditems (1998) Separate SSL Server (1997) WebMerchant 1.6 and SHTML (1997) Nesting Search Within Tag? (1997) Can I invoke an ssi plugin from within a webcat page (1997) refresh (2000) ANSWER to: CC Merchant suggestions?? (1997) TemplateCacheSize preference (1998) errors 550, and 108 (1998)