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)
conditional help needed
nico
TS 552 win2k
I've got a tpl where I want the value of a dcr to be placed in a cell however if there is no value I want an empty cell. My code below is spitting out empty cells only even when there is a value. My if/then must be hosed. Help?
<?xml version="1.0" encoding="ISO-8859-1"?>
<iw_pt name="dividends">
<![CDATA[
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>x</title>
</head>
<body bgcolor="#ffffff">
<table cellspacing="2" cellpadding="2" border="1">
<tr>
<td>year</td>
<td>q1</td>
<td>q2</td>
<td>q3</td>
<td>q4</td>
<td>other</td>
</tr>
]]> <iw_iterate var='mod' list='dcr.Module'>
<iw_if expr='{iw_value name="mod.Page Type"/} eq "new" '>
<iw_then>
<![CDATA[
<tr>
<td><iw_value name="mod.Year" /></td>
]]><iw_iterate var='rep' list='mod.Details'>
<iw_if expr='{iw_value name="rep.Details" /} eq "" '>
<iw_then>
<![CDATA[
<td> </td>
]]></iw_then>
<iw_else><![CDATA[
<td><iw_value name="rep.Details" /></td>
]]></iw_else>
</iw_if>
</iw_iterate><![CDATA[
</tr>
]]></iw_then>
</iw_if>
</iw_iterate><![CDATA[
</table>
</body>
</html>
]]>
</iw_pt>
thanks,
Nico
Find more posts tagged with
Comments
Adam Stoller
Try this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<iw_pt name="dividends"
/
>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>x</title>
</head>
<body bgcolor="#ffffff">
<table cellspacing="2" cellpadding="2" border="1">
<tr>
<td>year</td>
<td>q1</td>
<td>q2</td>
<td>q3</td>
<td>q4</td>
<td>other</td>
</tr>
<iw_iterate var='mod' list='dcr.Module'>
<iw_if expr='{iw_value name="mod.Page Type"/} eq "new" '>
<iw_then>
<tr>
<td><iw_value name="mod.Year" /></td>
<iw_iterate var='rep' list='mod.Details'>
<iw_if expr='
(!defined({iw_value name="rep.Details"}) ||
{iw_value name="rep.Details" /} eq ""
)
'>
<iw_then>
<td> </td>
</iw_then>
<iw_else>
<td><iw_value name="rep.Details" /></td>
</iw_else>
</iw_if>
</iw_iterate>
</tr>
</iw_then>
</iw_if>
</iw_iterate>
</table>
</body>
</html>
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com