Re: [WebDNA] passing a variable in an include - precedence

This WebDNA talk-list message is from

2017


It keeps the original formatting.
numero = 113422
interpreted = N
texte = 1015 Maybe a page like this one would help: = http://www.webdna.us/page.dna?numero=3D112520 - chris > On Feb 22, 2017, at 04:32, Tom Duke wrote: >=20 > Hi all, >=20 > It would definitely be good to get a clear handle on the relationship = and hierarchy between all of the different types of variables. =20 >=20 > The changed behaviour has left me struggling a bit to define default = values in an include file which can then be overwritten if values are = passed in as include variables. >=20 > =46rom a 2012 post by Brian Fries (thanks Brian) it turns out - and I = did not know this - that the following tags can be used in an include = file: >=20 > [formvariables form=3Dinclude][name]=3D[value][/formvariables] > [params_string] >=20 >=20 > So if we configure the files like this: >=20 >=20 > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-test1.dna=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94- > [include file=3Dtest2.inc&var1=3Dinclude1&var2=3Dinclude2&var4=3Dinclude= 4] >
> main file : [var1] with [var2] with [var3] with [var4] > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94-=E2=80=94=E2=80=94 >=20 > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-test2.inc=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94- > [text]var1=3Ddefault1[/text] > [text]var2=3Ddefault2[/text] > [text]var3=3Ddefault3[/text] > [text]var4=3Ddefault4[/text] >=20 > [listwords = words=3D[url][params_string][/url]&delimiters=3D[url]&[/url]][hideif = [index]=3D1][text][word][/text][/hideif][/listwords] >=20 > included file : [var1] with [var2] with [var3] with [var4] > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94-=E2=80=94=E2=80=94=E2=80=94 >=20 >=20 > I get the desired result. I have stopped using insecure text = variables to set defaults in include files as they are useless if the = include field is used a second or more times further down in the code. = This all feels like a hack and probably is, but it works. >=20 > Interestingly if I use this in the include file: >=20 >=20 > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-test2.inc=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94- > [text]var1=3Ddefault1[/text] > [text]var2=3Ddefault2[/text] > [text]var3=3Ddefault3[/text] > [text]var4=3Ddefault4[/text] >=20 > [formvariables = form=3Dinclude&name=3Dvar&exact=3DF][text][name]=3D[value][/text][/formvar= iables] >=20 > included file : [var1] with [var2] with [var3] with [var4] > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94-=E2=80=94=E2=80=94=E2=80=94 >=20 > It doesn't work as desired. The [formvariables] get completely wiped = it seems after the text variables are defined. >=20 > - Tom --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] passing a variable in an include - precedence (christophe.billiottet@webdna.us 2017)
  2. Re: [WebDNA] passing a variable in an include - precedence (christophe.billiottet@webdna.us 2017)
  3. Re: [WebDNA] passing a variable in an include - precedence (Tom Duke 2017)
  4. Re: [WebDNA] passing a variable in an include - precedence (Stuart Tremain 2017)
  5. Re: [WebDNA] passing a variable in an include - precedence (Donovan Brooke 2017)
  6. Re: [WebDNA] passing a variable in an include - precedence (Tom Duke 2017)
  7. Re: [WebDNA] passing a variable in an include - precedence (christophe.billiottet@webdna.us 2017)
  8. Re: [WebDNA] passing a variable in an include - precedence (Tom Duke 2017)
  9. Re: [WebDNA] passing a variable in an include - precedence ("Matthew A Perosi, Psi Prime" 2015)
  10. Re: [WebDNA] passing a variable in an include - precedence (Donovan Brooke 2015)
  11. Re: [WebDNA] passing a variable in an include - precedence ("Matthew A Perosi, Psi Prime" 2015)
  12. Re: [WebDNA] passing a variable in an include - precedence (Donovan Brooke 2015)
  13. Re: [WebDNA] passing a variable in an include - precedence (Matthew Perosi 2015)
  14. Re: [WebDNA] passing a variable in an include - precedence (Kenneth Grome 2015)
  15. [WebDNA] passing a variable in an include - precedence (christophe.billiottet@webdna.us 2015)
1015 Maybe a page like this one would help: = http://www.webdna.us/page.dna?numero=3D112520 - chris > On Feb 22, 2017, at 04:32, Tom Duke wrote: >=20 > Hi all, >=20 > It would definitely be good to get a clear handle on the relationship = and hierarchy between all of the different types of variables. =20 >=20 > The changed behaviour has left me struggling a bit to define default = values in an include file which can then be overwritten if values are = passed in as include variables. >=20 > =46rom a 2012 post by Brian Fries (thanks Brian) it turns out - and I = did not know this - that the following tags can be used in an include = file: >=20 > [formvariables form=3Dinclude][name]=3D[value][/formvariables] > [params_string] >=20 >=20 > So if we configure the files like this: >=20 >=20 > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-test1.dna=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94- > [include file=3Dtest2.inc&var1=3Dinclude1&var2=3Dinclude2&var4=3Dinclude= 4] >
> main file : [var1] with [var2] with [var3] with [var4] > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94-=E2=80=94=E2=80=94 >=20 > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-test2.inc=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94- > [text]var1=3Ddefault1[/text] > [text]var2=3Ddefault2[/text] > [text]var3=3Ddefault3[/text] > [text]var4=3Ddefault4[/text] >=20 > [listwords = words=3D[url][params_string][/url]&delimiters=3D[url]&[/url]][hideif = [index]=3D1][text][word][/text][/hideif][/listwords] >=20 > included file : [var1] with [var2] with [var3] with [var4] > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94-=E2=80=94=E2=80=94=E2=80=94 >=20 >=20 > I get the desired result. I have stopped using insecure text = variables to set defaults in include files as they are useless if the = include field is used a second or more times further down in the code. = This all feels like a hack and probably is, but it works. >=20 > Interestingly if I use this in the include file: >=20 >=20 > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-test2.inc=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94- > [text]var1=3Ddefault1[/text] > [text]var2=3Ddefault2[/text] > [text]var3=3Ddefault3[/text] > [text]var4=3Ddefault4[/text] >=20 > [formvariables = form=3Dinclude&name=3Dvar&exact=3DF][text][name]=3D[value][/text][/formvar= iables] >=20 > included file : [var1] with [var2] with [var3] with [var4] > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94-=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94-=E2=80=94=E2=80=94=E2=80=94 >=20 > It doesn't work as desired. The [formvariables] get completely wiped = it seems after the text variables are defined. >=20 > - Tom --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us . christophe.billiottet@webdna.us

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:

Dropdown menus (2006) Webcat no longer supported? (2006) [OT] html background att (2003) Multiple edits/replacementsd to db. Possible? (1997) More than one db with the same namn (was: WC2f3) (1997) BUG NOTICE: (2003) Credit card types (1997) [WebDNA] [OT] thanks. (2009) [WebDNA] Yosemite (2014) mass mailing (1998) carriage returns in data (1997) RE: Clearing orders and database help! (1997) [shell] stopped ?? (2003) Nested tags count question (1997) [Announce] Newest Commerce Site based on WebCatalog (1997) Some Questions (1997) WebCatalog can't find database (1997) [WebDNA] Error 500 with SUMM=T (2017) Firesite and [referrer] atg broke (1997) Summary search -- speed (1997)