Re: Reversed words

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10382
interpreted = N
texte = >>Per the pdf file it claims that there are certain reserved words like >>address1 and address2 and email and company and price, etc. > >This is only important if you plan to use the shopping cart. The shopping >cart file has header fields named address1, email, etc. While it is >possible to have a database with exactly those fieldnames, we recommend >for simplicity that you stay away from those names to reduce confusion if >you ever want to display database field address1 on the same page where >a shopping cart header field address1 is also displayed. > >WebCatalog2 'does the right thing' in these cases; it looks for the >fieldname that is closest 'in context' to what you're displaying, but >sometimes it's confusing to us humans. For example, if you have a database >field named [date] and you use the following, what happens? > >[foundItems] >[date]
>[/foundItems] > >WebCatalog is smart enough to realize that there is a [date] field in the >database, and will use that field instead of today's date. But at this >time there is no way for you to display both the database field and >today's date inside that [foundItems] loop, because it has no way of >knowing which one you mean. Everyone, please don't forget (if you ever need this tip) that you can have as many [foundItem] loops in a results template as you want. Let's say you have a single [foundItems] loop on your results template but you want to use today's date somewhere INSIDE that loop.Well, instead of thinking that this will be a hassle, just 'end the loop', then display today's date with a [date] tag, then 'start another loop'. You can do all three steps simply by using:[/founditems] [date] [founditems]See what we're doing here? Instead of actually displaying today's date 'inside' your original [foundItems] loop, we display today's date 'outside the loop' by splitting the original [foundItems] loop into two separate [foundItems] loops ... so the entire page would actually have all the following tags:[foundItems] <--- some database field values inside this first loop [/foundItems] [date] <--- this gives you today's date [foundItems] <--- (more database field values inside this second loop [/foundItems]By the way, there's another way to get the very same results *within* the original [foundItems] loop (if you have some aesthetic reason for *not* splitting the original loop into two separate loops) ... but it requires setting variable values outside the loop and then using those values inside the loop. This 'variable' technique is more complicated and not necessary in most cases, but it can be done! :) ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

    
  1. Re: Reversed words (Kenneth Grome 1997)
  2. Re: Reversed words (Grant Hulbert 1997)
  3. Reversed words (grichter@panavise.com (Gary Richter) 1997)
>>Per the pdf file it claims that there are certain reserved words like >>address1 and address2 and email and company and price, etc. > >This is only important if you plan to use the shopping cart. The shopping >cart file has header fields named address1, email, etc. While it is >possible to have a database with exactly those fieldnames, we recommend >for simplicity that you stay away from those names to reduce confusion if >you ever want to display database field address1 on the same page where >a shopping cart header field address1 is also displayed. > >WebCatalog2 'does the right thing' in these cases; it looks for the >fieldname that is closest 'in context' to what you're displaying, but >sometimes it's confusing to us humans. For example, if you have a database >field named [date] and you use the following, what happens? > >[founditems] >[date]
>[/foundItems] > >WebCatalog is smart enough to realize that there is a [date] field in the >database, and will use that field instead of today's date. But at this >time there is no way for you to display both the database field and >today's date inside that [founditems] loop, because it has no way of >knowing which one you mean. Everyone, please don't forget (if you ever need this tip) that you can have as many [foundItem] loops in a results template as you want. Let's say you have a single [founditems] loop on your results template but you want to use today's date somewhere INSIDE that loop.Well, instead of thinking that this will be a hassle, just 'end the loop', then display today's date with a [date] tag, then 'start another loop'. You can do all three steps simply by using:[/founditems] [date] [founditems]See what we're doing here? Instead of actually displaying today's date 'inside' your original [founditems] loop, we display today's date 'outside the loop' by splitting the original [founditems] loop into two separate [founditems] loops ... so the entire page would actually have all the following tags:[founditems] <--- some database field values inside this first loop [/foundItems] [date] <--- this gives you today's date [founditems] <--- (more database field values inside this second loop [/foundItems]By the way, there's another way to get the very same results *within* the original [founditems] loop (if you have some aesthetic reason for *not* splitting the original loop into two separate loops) ... but it requires setting variable values outside the loop and then using those values inside the loop. This 'variable' technique is more complicated and not necessary in most cases, but it can be done! :) ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ 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:

HTML Editors (1997) db protection on NT (1997) Project 2 (1998) UNSUBSCRIBE ME (2004) extending webcatalog (1997) Include File Tag (2003) Rumpus/Typhoon modules included in Typhoon ... (1997) Next (1997) [WebDNA] [BULK] WebDNA 7 - Ready or Not ?? I'm not sure... (2011) Bug Report, maybe (1997) hmmm (2006) Sitebuilder ifs not matching [SMSI?] (2004) webcat2b12 CGI -- Date comparisons (1997) Help formatting search results w/ table (1997) X etc.... (1999) [WebDNA] multi hyperlinks in text paragraphs (2014) Cancel Subscription (1996) 2.0Beta Command Ref (can't find this instruction) (1997) [Applescript] (2000) Access Denied! But why? (1997)