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)
if statement with template not working
cspurgeon
I'm not to TeamSite (tossed in and told to make a template) and here's my issue.
I have an if statement that should only fire if a checkbox has been checked. But it seems to fire whether the box has been checked or not. Here's the relevant code (this is all inside iw_perl tags)....
foreach my $feature (iwpt_dcr_list('dcr.report')) {
$includeFlagValue = iwpt_dcr_value('feature.homePageFlag');
if ($includeFlagValue == "Yes") {
print "<!--home page flag triggered -->\n";
print "<!--the value is *" . $includeFlagValue . "*-->";
} else {
print "<!--no home page flag -->\n";
print "<!--the value is *" . $includeFlagValue . "*-->";
}
}
In all cases, the "if" section fires, even though $includeFlagValue isn't always equal to "Yes". Any ideas anyone?
Chris Spurgeon
Find more posts tagged with
Comments
Migrateduser
In PERL you don't use == for strings. You use eq for equality and ne for not equal.
- Jason
cspurgeon
****! I knew that! (Or used to know it). Too much other languages, not enough Perl lately. Thanks so much!