Re: can we get string variables?

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17297
interpreted = N
texte = On 4/25/1998 7:40 PM, Peter Ostry so noted...>I know I am not the first one asking for that, but it would really be >fine to have string variables i.e. > [var FirstName=Suzie] > [var LastName=Wong] > Nice to see you, [var FirstName] [var LastName]!If you've passed a cart to the page, you could do this with the generic header fields in the cart, such as[setheader cart=[cart]]header1=Suzie&header2=Wong[/setheader] [orderfile cart=[cart]] Nice to see you, [header1] [header2]! [/orderfile]>With these variables one can loop through databases or carts, set the >variables and use them afterwards throughout the page, regardless of >their final position (improves flexibility and performance): > [lineitems] > [var YourLastItem=[TextA]] > [/lineitems] > ...many many code... > Yup, [var YourLastItem] was the last you added![orderfile cart=[cart]] [lineitems] [setheader cart=[cart]header3=[TextA][/setheader] [/lineitems] many many code... Yup, [header3] was the last you added! [/orderfile]The downside to this is that you do have to use a cart and [orderfile] for each page, plus, any reference to [date] or [time] that you need to use inside the [orderfile] will have to be set to a header*outside* the context (since inside, date and time refer to the cart's built-in headers of the same names). Granted, it's a bit of a kludge (not to mention my cheat sheet of what I have header1-40 referring to ; ) but I know that its come in amazingly handy and seems to be robust enough for extensive use.Rob Marquardt Designer/Resident Wirehead Toast Design300 First Avenue North, Suite 150 Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.com Associated Messages, from the most recent to the oldest:

    
  1. [Fwd: can we get string variables?] (webmaster@textileweb.net (Bill Norman) 1998)
  2. RE: can we get string variables? (Olin 1998)
  3. Re: can we get string variables? (Rob Marquardt 1998)
  4. Re: can we get string variables? (Peter Ostry 1998)
  5. Re: can we get string variables? (Rob Marquardt 1998)
  6. can we get string variables? (Peter Ostry 1998)
On 4/25/1998 7:40 PM, Peter Ostry so noted...>I know I am not the first one asking for that, but it would really be >fine to have string variables i.e. > [var FirstName=Suzie] > [var LastName=Wong] > Nice to see you, [var FirstName] [var LastName]!If you've passed a cart to the page, you could do this with the generic header fields in the cart, such as[setheader cart=[cart]]header1=Suzie&header2=Wong[/setheader] [orderfile cart=[cart]] Nice to see you, [header1] [header2]! [/orderfile]>With these variables one can loop through databases or carts, set the >variables and use them afterwards throughout the page, regardless of >their final position (improves flexibility and performance): > [lineitems] > [var YourLastItem=[TextA]] > [/lineitems] > ...many many code... > Yup, [var YourLastItem] was the last you added![orderfile cart=[cart]] [lineitems] [setheader cart=[cart]header3=[TextA][/setheader] [/lineitems] many many code... Yup, [header3] was the last you added! [/orderfile]The downside to this is that you do have to use a cart and [orderfile] for each page, plus, any reference to [date] or [time] that you need to use inside the [orderfile] will have to be set to a header*outside* the context (since inside, date and time refer to the cart's built-in headers of the same names). Granted, it's a bit of a kludge (not to mention my cheat sheet of what I have header1-40 referring to ; ) but I know that its come in amazingly handy and seems to be robust enough for extensive use.Rob Marquardt Designer/Resident Wirehead Toast Design300 First Avenue North, Suite 150 Minneapolis MN 55401 612.330.9863 v 612.321.9424 f www.toastdesign.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:

2nd WebCatalog2 Feature Request (1996) MacAuthorize order data fields WAS:How To question... (1997) syntax question, not in online refernce (1997) Template Encryption (1998) [WebDNA] find missing file in [listfiles] (2019) [WebDNA] Digital Ocean /WebDNA is not configured to accept (2019) Botched cart numbers in webmerchant 2.1x email with webcat 3 (1998) WildWEBCAT98 Voting is OPEN! (1999) taxrate (1999) RE: Can a database get stomped by simultaneous access? (1997) calculating tax rates, mail order solutions and version 2 (1997) Customer (1998) Click-through/Referral tracking solution needed (2000) oops private message leaked into talk list (1997) is your webDNA site 'froogle' ready ??? (2003) [WebDNA] My SQL will not Connect (2020) snicker, snicker (1997) Simple Database close connection (2001) Bug Report, maybe (1997) Read and weep (2003)