I've never had a problem with this by u=rl'ing the variable if there's a chance it will contain an exclamation point=, equal sign or some other comparison symbol, which would cause a false comp=arison. If the variable is a known quantity, such as a variable you feed it f=rom a form value or otherwise explicitly set (as it appears to be here), the=n there's no need to waste your time with unnecessary [url]ing. Another simp=ler way is to reverse the comparison:
[showif =3D[selector]]
=
This way, even if it is something that could contain problematic c=haracters, they will come after the =3D and not cause a problem.
I'm curious if this isn't working, or if you are just wonderin=g out loud before coding it.
On Mar 13, 2015, at 3:59 PM, Steve Braun <
sbraun1@twcny.rr.com> wrote:
Hi All,
I am having an 'age-old' problem with webDNA.
I want to use a= showif tag with an empty variable.
I've read some of the arch=ives, but they don't seem to apply.
This works:
[showif= [selector]=3Dhome] [include home_page.inc] [/=showif]
[showif [selector]=3Dlocal] [=include local_page.inc] [/showif]
How d=o I make this work?
[showif [selector]=3D] [include bla=nk_page.inc] [/showif]
Thanks fo=r any assistance.
---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list
.To unsubscribe, E-mail to: archives: http://mail.=webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
=--Apple-Mail-8E6E0D1D-D69A-4302-8875-118B4F10FD22--
Associated Messages, from the most recent to the oldest:
--Apple-Mail-8E6E0D1D-D69A-4302-8875-118B4F10FD22Content-Type: text/plain;charset=us-asciiContent-Transfer-Encoding: quoted-printableI've never had a problem with this by url'ing the variable if there's a chan=ce it will contain an exclamation point, equal sign or some other comparison= symbol, which would cause a false comparison. If the variable is a known qu=antity, such as a variable you feed it from a form value or otherwise explic=itly set (as it appears to be here), then there's no need to waste your time= with unnecessary
[url]ing. Another simpler way is to reverse the comparison=:> [showif =3D[selector]]This way, even if it is something that could contain problematic characters,= they will come after the =3D and not cause a problem.I'm curious if this isn't working, or if you are just wondering out loud bef=ore coding it.TerrySent from my iPad> On Mar 13, 2015, at 3:59 PM, Steve Braun
wrote:>=20> Hi All,> I am having an 'age-old' problem with webDNA.> I want to use a showif tag with an empty variable.> I've read some of the archives, but they don't seem to apply.>=20> This works:> [showif [selector]=3Dhome] [include home_page.inc] [/showif] =20> [showif [selector]=3Dlocal] [include local_page.inc] [/showif] =20>=20> How do I make this work?> [showif [selector]=3D] [include blank_page.inc] [/showif] =20>=20> Thanks for any assistance.>=20> Stephen F Braun> sbraun1@twcny.rr.com> --------------------------------------------------------- This message is s=ent 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--Apple-Mail-8E6E0D1D-D69A-4302-8875-118B4F10FD22Content-Type: text/html;charset=utf-8Content-Transfer-Encoding: quoted-printableI've never had a problem with this by u=rl'ing the variable if there's a chance it will contain an exclamation point=, equal sign or some other comparison symbol, which would cause a false comp=arison. If the variable is a known quantity, such as a variable you feed it f=rom a form value or otherwise explicitly set (as it appears to be here), the=n there's no need to waste your time with unnecessary
[url]ing. Another simp=ler way is to reverse the comparison:
[showif =3D[selector]]
=
This way, even if it is something that could contain problematic c=haracters, they will come after the =3D and not cause a problem.
<=br>
I'm curious if this isn't working, or if you are just wonderin=g out loud before coding it.
Terry
Sent from= my iPad