Re: Don't know if this is a sily question...
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 50772
interpreted = N
texte = That's a great coding tip and one I expect to use very often. Thanks Ken.-----Original Message-----From: Kenneth Grome
Sent: Fri, 30 May 2003 01:18:00To: (WebDNA Talk)Subject: Re: Don't know if this is a sily question...>As a related comment, using WebDNA 5 I find myself more often using >[function]s where I used to use [include]s to handle recurring >tasks. The formal use of parameters, the local scope variables, and >the ability to define functions within the page itself as well as in >a shared include file are compelling features.>>As a simple example:>>[function name=MyLink]>[return]db=....&value=[thevalue]&returnfield=ID]>[lookup >db=....&value=[thevalue]&returnfield=title]
[/return]>[/function]>>[search ...]>[founditems]>[MyLink thevalue=[whatever]]>[/founditems]>[/search]>>- brianI've been doing something similar for years, without v5's function context:[text]myLink=[raw][lookup db=....&value=[thevalue]&returnfield=title]
[/raw][/text][search ...][founditems][myLink][/founditems][/search]This has always been an easy way to create a variable once at the top of the page, and then use it any number of times further down on the same page -- while preventing the webdna code inside the text variable from being interpreted until the variable tag is used further down on the page -- such as inside the founditems context in this example.-- Sincerely,Kenneth Grome-------------------------------------------------------------My programmers will write WebDNA code for you at $27 an hour!--------------------------------------------------------------------------------------------------------------------------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/-------------------------------------------------------------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:
That's a great coding tip and one I expect to use very often. Thanks Ken.-----Original Message-----From: Kenneth Grome Sent: Fri, 30 May 2003 01:18:00To: (WebDNA Talk)Subject: Re: Don't know if this is a sily question...>As a related comment, using WebDNA 5 I find myself more often using >[function]s where I used to use [include]s to handle recurring >tasks. The formal use of parameters, the local scope variables, and >the ability to define functions within the page itself as well as in >a shared include file are compelling features.>>As a simple example:>>[function name=MyLink]>[return]db=....&value=[thevalue]&returnfield=ID]>[lookup >db=....&value=[thevalue]&returnfield=title]
[/return]>[/function]>>[search ...]>[founditems]>[MyLink thevalue=[whatever]]>[/founditems]>[/search]>>- brianI've been doing something similar for years, without v5's function context:[text]myLink=[raw][lookup db=....&value=[thevalue]&returnfield=title]
[/raw][/text][search ...][founditems][myLink][/founditems][/search]This has always been an easy way to create a variable once at the top of the page, and then use it any number of times further down on the same page -- while preventing the webdna code inside the text variable from being interpreted until the variable tag is used further down on the page -- such as inside the founditems context in this example.-- Sincerely,Kenneth Grome-------------------------------------------------------------My programmers will write WebDNA code for you at $27 an hour!--------------------------------------------------------------------------------------------------------------------------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/-------------------------------------------------------------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/
devaulw@onebox.com
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:
[AppendFile] problem (WebCat2b13 Mac .acgi) (1997)
purchase plugin (1996)
autosensing lanague selection (1997)
FEA REQ: One .hdr, multiple .db's (2003)
Some Advise needed (1997)
Bulletin Board (1998)
[BULK] [WebDNA] A new commerce system for v7+ (2011)
RE: IIS4b2 and WebCatalog b19 (1997)
convertchars and case? (1998)
[WebDNA] Sandbox Triggers (2008)
Problems adding stuff to the shopping cart. (1997)
Applescript, WebDNA, and PDF (1997)
Webcatalog and foreign languages (1998)
Installer needed (2004)
Search/sort in URL Was: GuestBook example (1997)
WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)
[FoundItems] solved - thanks (1997)
Restart of DBserver (1997)
Bulletin Board needed (2007)
Add to a field (1998)