Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Having problem with <iw_if> tag
vipulj
Hi,
I am tryin to use <iw_if> tag for my tpl something like this
<iw_perl><![CDATA[
my $flag = 'false' ;
]]></iw_perl>
<iw_if expr= ' $flag eq true ' >
<iw_then>
....
.....
</iw_then>
</iw_if>
but still it enters inside the iw_then can somebody please tell me what's the problem, i am working on TS6.5 with Service Pack 2. Any help will be greatly appreciated.
Thanks,
Vipul
Find more posts tagged with
Comments
jbonifaci
There are several things wrong with your post. The first is that it is in the wrong forum. This should be in TeamSite FormsPublisher (Templating) Forum. The second is that $flag is not false, it is a string with the characters f, a, l, s and e. A string will always evaluate to true. Third, I'm fairly certain that eq is a string operator only, so if you are setting your flag to the string 'false' or the string 'true', you need to check if $flag is eq to 'true'.
~Jeff
Nidhi_Agrawal
Use this..
<iw_if expr=' {iw_value name="$false"/} eq "valueToCheck" ' >
I think there is no such type of value "true" & "false" in Perl..
You can simply take value of valueToCheck "0" for false and "1" for true condition.