[WebDNA] SWITCH/CASE or SHOWIF

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101486
interpreted = N
texte = We have about a 100 different brands at our store. Some brands have "static" brand pages (brand/index.html) while others have "dynamic" brand pages (dynamic.tpl?brand=somebrand). 1. To go through 100 different choices, is a switch/case more efficient or 100 showif statements more efficient? 2. In the final generated HTML code, when 100 SHOWIF statements are processed, but only 1 is actually shown, the other 99 SHOWIF statements create line breaks. Is there a way to prevent the line breaks from showing up if a showif does not evaluate to true? 3. Does a SWITCH/CASE statement create line breaks for all the cases that evaluate to false? Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] SWITCH/CASE or SHOWIF (Ki Song 2008)
  2. Re: [WebDNA] SWITCH/CASE or SHOWIF ("Dan Strong" 2008)
  3. Re: [WebDNA] SWITCH/CASE or SHOWIF (Toby Cox 2008)
  4. Re: [WebDNA] SWITCH/CASE or SHOWIF (Govinda 2008)
  5. Re: [WebDNA] SWITCH/CASE or SHOWIF ("Dan Strong" 2008)
  6. Re: [WebDNA] SWITCH/CASE or SHOWIF (Ki Song 2008)
  7. Re: [WebDNA] SWITCH/CASE or SHOWIF (Govinda 2008)
  8. [WebDNA] SWITCH/CASE or SHOWIF (Ki Song 2008)
We have about a 100 different brands at our store. Some brands have "static" brand pages (brand/index.html) while others have "dynamic" brand pages (dynamic.tpl?brand=somebrand). 1. To go through 100 different choices, is a switch/case more efficient or 100 showif statements more efficient? 2. In the final generated HTML code, when 100 SHOWIF statements are processed, but only 1 is actually shown, the other 99 SHOWIF statements create line breaks. Is there a way to prevent the line breaks from showing up if a showif does not evaluate to true? 3. Does a SWITCH/CASE statement create line breaks for all the cases that evaluate to false? Ki Song

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:

WebCatalog/Mac 2.1b2 - PIXO (1997) Zipcodes (1998) Webcatalog error, Plug-in for Webstar (1996) Major Security Hole IIS NT (1998) Bug? (1997) Make sure I understand this??? (1997) WebCat2 beta 11 - new prefs ... (1997) and more [shipcost].... (2001) encrypt but with normal characters for result? (2005) Has this happened to you? (was:Emailer Chokes on bad address) (1997) Micro-managing External Links (2006) WebCat2 - many [carts] on one template page? (1997) Database Changes (2000) Re2: frames & carts (1997) email preferences on NT (1997) Questions To Answer (1997) Bug Report, maybe (1997) Calendar using WebCatalog? (1997) PSC recommends what date format yr 2000??? (1997) Part Html part WebDNA (1997)