Re: default image if image in code not available

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 46864
interpreted = N
texte = on 1/14/03 3:16 AM, Christer Olsson at christer@ljusaideer.se so noted...> You might to want to reduce the number of disk hits by using something like > this: > > [TEXT]vImage=generic.gif[/TEXT] > [showif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T] > [TEXT]vImage=[sku].gif[/TEXT] > [/showif] > > > > Or, even better, run a loop doing the check above once a day, or when new > products are added and use a hasPicture field in your db. > >> Tim, your example will not work. Steve, needs to look for the image file, >> not the sku in the database. >> If there is no sku, then there is no product,,,, so why would you need a >> photo anyway. >> >> Try this code: >> >> [showif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T] >> >> [/showif] >> [hideif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T] >> >> [/hideif]You could wrap the [fileinfo] around the whole thing too.[fileinfo file=images/[sku].gif] [showif [exists]=T] [/showif] [hideif [exists]=T] [/hideif] [/fileinfo] And a SMSI question:If two [fileinfo] contexts for the same file happen on the same page, does it result in two disk hits, or is the result for the first one cached in memory for the rest of the page? Rob Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: default image if image in code not available (Rob Marquardt 2003)
  2. Re: default image if image in code not available (Christer Olsson 2003)
  3. Re: default image if image in code not available (steve chun 2003)
  4. Re: default image if image in code not available (Tim Robinson 2003)
  5. Re: default image if image in code not available (Brian Boegershausen 2003)
  6. Re: default image if image in code not available (Tim Robinson 2003)
  7. default image if image in code not available (steve chun 2003)
on 1/14/03 3:16 AM, Christer Olsson at christer@ljusaideer.se so noted...> You might to want to reduce the number of disk hits by using something like > this: > > [text]vImage=generic.gif[/TEXT] > [showif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T] > [text]vImage=[sku].gif[/TEXT] > [/showif] > > > > Or, even better, run a loop doing the check above once a day, or when new > products are added and use a hasPicture field in your db. > >> Tim, your example will not work. Steve, needs to look for the image file, >> not the sku in the database. >> If there is no sku, then there is no product,,,, so why would you need a >> photo anyway. >> >> Try this code: >> >> [showif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T] >> >> [/showif] >> [hideif [fileinfo file=images/[sku].gif][exists][/fileinfo]=T] >> >> [/hideif]You could wrap the [fileinfo] around the whole thing too.[fileinfo file=images/[sku].gif] [showif [exists]=T] [/showif] [hideif [exists]=T] [/hideif] [/fileinfo] And a SMSI question:If two [fileinfo] contexts for the same file happen on the same page, does it result in two disk hits, or is the result for the first one cached in memory for the rest of the page? Rob Marquardt Designer/Resident Wirehead Toast Design800 Washington Avenue North Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Rob Marquardt

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:

OLD PROBLEM (1997) Grep and removing text (2002) WebCat2: multiple currency support (1997) Question on TABLES (2003) OT: RAID Options (2004) EIMS & emailer conflicts? (1999) [searchString] (1997) WebCatalog (1998) Summary search -- speed (1997) Problems with [Search] param - Mac Plugin b15 (1997) RE: Answer: WebDelivery downloads alias, not original ? (1997) PCS Frames (1997) [WriteFile] problems (1997) newbie question about zip code search (2003) Upload (1998) Calendar Program (2004) shipping with weigth (1998) Question on the sandbox (2003) Auto SKU's (2000) RAM variables (1997)