Re: Don't know if this is a sily question...
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 50769
interpreted = N
texte = >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/
Associated Messages, from the most recent to the oldest:
>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/
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:
how to check for no value while using [URL] to prevent cr (1999)
Help needed! (1998)
FIXED - RE: Rounding Prices? (2000)
Looking for a special Image Upload Script (2004)
Encrypted links ... (2000)
[format xs] freeze (1997)
Works! (1997)
Deadlock (1999)
unable to launch acgi in WebCat (1997)
Hyperboard/bulletin board available (1998)
Extended [ConvertChars] (1997)
WebCat2: Items xx to xx shown, etc. (1997)
My own list archives (2001)
Multiple security dbs (1997)
Webstar 1.3.1 PPC (1997)
(2000)
Running 2 two WebCatalog.acgi's (1996)
[WebDNA] OS and version (2019)
[WebDNA] Friday's.. WIP thread (2009)
[include ...] behavior (1997)