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

This WebDNA talk-list message is from

2017


It keeps the original formatting.
numero = 113420
interpreted = N
texte = 1013 --94eb2c14c872ceb0e7054914798b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, It would definitely be good to get a clear handle on the relationship and hierarchy between all of the different types of variables. 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. From 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: [formvariables form=3Dinclude][name]=3D[value][/formvariables] [params_string] So if we configure the files like this: =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=3Dinclude4]
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 =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] [listwords words=3D[url][params_string][/url]&delimiters=3D[url]&[/url]][hi= deif [index]=3D1][text][word][/text][/hideif][/listwords] 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 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. Interestingly if I use this in the include file: =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] [formvariables form=3Dinclude&name=3Dvar&exact=3DF][text][name]=3D[value][/text][/formvari= ables] 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 It doesn't work as desired. The [formvariables] get completely wiped it seems after the text variables are defined. - Tom --94eb2c14c872ceb0e7054914798b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

It would definitely be good to = get a clear handle on the relationship and hierarchy between all of the dif= ferent types of variables. =C2=A0

The changed beha= viour has left me struggling a bit to define default values in an include f= ile which can then be overwritten if values are passed in as include variab= les.

From a 2012 post by Brian Fries (thanks Brian= ) it turns out - and I did not know this - that the following tags can be u= sed in an include file:

[formvariables form=3Dinclude][name]= =3D[value][/formvariables]
[params_string]


So if we configure the files like this:


=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]
<br>
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

=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]
[t= ext]var4=3Ddefault4[/text]

[listwords words= =3D[url][params_string][/url]&delimiters=3D[url]&[/url]][hideif [in= dex]=3D1][text][word][/text][/hideif][/listwords]

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


<= div>I get the desired result.=C2=A0 I have stopped using insecure text vari= ables to set defaults in include files as they are useless if the include f= ield is used a second or more times further down in the code.=C2=A0 This al= l feels like a hack and probably is, but it works.

Interestingly if I use this in the include file:

=
<= div>
=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=3D= default1[/text]
[text]var2=3Ddefault2[/text= ]
[text]var3=3Ddefault3[/text]
<= /div>
[text]var4=3Ddefault4[/text]

[formvariables form=3Dinclude&name=3Dva= r&exact=3DF][text][name]=3D[value][/text][/formvariables]

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
<= /div>

<= /span>
It doesn= 9;t work as desired.=C2=A0 The [formvariables] get=C2=A0completely wiped it= seems after=C2=A0the text variables are defined.

- 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 --94eb2c14c872ceb0e7054914798b-- . 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)
1013 --94eb2c14c872ceb0e7054914798b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, It would definitely be good to get a clear handle on the relationship and hierarchy between all of the different types of variables. 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. From 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: [formvariables form=3Dinclude][name]=3D[value][/formvariables] [params_string] So if we configure the files like this: =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=3Dinclude4]
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 =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] [listwords words=3D[url][params_string][/url]&delimiters=3D[url]&[/url]][hi= deif [index]=3D1][text][word][/text][/hideif][/listwords] 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 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. Interestingly if I use this in the include file: =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] [formvariables form=3Dinclude&name=3Dvar&exact=3DF][text][name]=3D[value][/text][/formvari= ables] 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 It doesn't work as desired. The [formvariables] get completely wiped it seems after the text variables are defined. - Tom --94eb2c14c872ceb0e7054914798b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

It would definitely be good to = get a clear handle on the relationship and hierarchy between all of the dif= ferent types of variables. =C2=A0

The changed beha= viour has left me struggling a bit to define default values in an include f= ile which can then be overwritten if values are passed in as include variab= les.

From a 2012 post by Brian Fries (thanks Brian= ) it turns out - and I did not know this - that the following tags can be u= sed in an include file:

[formvariables form=3Dinclude][name]= =3D[value][/formvariables]
[params_string]


So if we configure the files like this:


=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]
<br>
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

=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]
[t= ext]var4=3Ddefault4[/text]

[listwords words= =3D[url][params_string][/url]&delimiters=3D[url]&[/url]][hideif [in= dex]=3D1][text][word][/text][/hideif][/listwords]

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


<= div>I get the desired result.=C2=A0 I have stopped using insecure text vari= ables to set defaults in include files as they are useless if the include f= ield is used a second or more times further down in the code.=C2=A0 This al= l feels like a hack and probably is, but it works.

Interestingly if I use this in the include file:

=
<= div>
=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=3D= default1[/text]
[text]var2=3Ddefault2[/text= ]
[text]var3=3Ddefault3[/text]
<= /div>
[text]var4=3Ddefault4[/text]

[formvariables form=3Dinclude&name=3Dva= r&exact=3DF][text][name]=3D[value][/text][/formvariables]

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
<= /div>

<= /span>
It doesn= 9;t work as desired.=C2=A0 The [formvariables] get=C2=A0completely wiped it= seems after=C2=A0the text variables are defined.

- 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 --94eb2c14c872ceb0e7054914798b-- . Tom Duke

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:

[WebDNA] JSONobject (2020) [no_cache]?! (2000) Search Results (1998) P3P and IE 6 (2004) WC2b15 File Corruption (1997) shipcost (1997) [returnraw] and form variables (1998) About WebDNA (2006) Link with [cart] in db field (1999) Setting up shop (1997) Help! Missing [showif] or [hideif] (2000) Me know logical no need (2002) Credit Card Number Stripping Digit (1997) Banners (1997) Multiple cart additions (1997) Protect and Serve (1999) [spawn] and [formvariables] (1999) [OT] FTP client (2003) [WebDNA] Converting | to TAB (2010) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)