View Full Version : Conditional Statement for gift registry
vanessayr
05-14-08, 09:29 PM
Currently I am using this instruction so it displays the list of items in a registry list:
%IF(g.reg_search)%
And then all the display.
I would like to find out a way so at the beginning says something like this:
%IFNOT(g.reg_search)%
Not items to display message.
is this possible?
PCINET - Andreas
05-14-08, 09:37 PM
Try this:
%IF(g.reg_search)%
list of items in a registry list
%ELSE%
Not items to display message
%IFEND%
vanessayr
05-14-08, 09:39 PM
I tried that but it ignored it.
PCINET - Andreas
05-14-08, 09:42 PM
Ignored the "else" part? Could you provide more details?
vanessayr
05-14-08, 09:51 PM
This is what I have to be more exact:
%OUI%
<table align=center width="815" id="table1" bgcolor="#FFFFFF" style="border-left:1px solid #686964; border-right:1px solid #686964; border-bottom:1px solid #686964; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" height="158" bgcolor="#FFFFFF" id="table2" style="padding-left: 13px; padding-right: 0; padding-bottom:14px" width="791">
<tr>
<td valign="top" width="583">
<FONT FACE="Verdana" color="#6e6e6e">
</FONT><TABLE BORDER="0" id="table3">
<TR><TD ALIGN="left" VALIGN="middle">
<B>Search for a Registry:</B>
</TD><TD ALIGN="left" VALIGN="middle">
<INPUT TYPE="text" NAME="reg_search" SIZE="40" VALUE="%VAR(g.reg_search)%">
</TD>
<TD ALIGN="left" VALIGN="middle">
%srch_button%</TD>
</TR>
<TR><TD>
</TD><TD ALIGN="left" VALIGN="middle">
</TD></TR>
</TABLE>
%IF(g.reg_search)%
<TABLE BORDER = 0 CELLPADDING = 2 CELLSPACING = 0 WIDTH = "100%" id="table4">
<TR BGCOLOR="#000080" VALIGN="BOTTOM">
<TD NOWRAP bgcolor="#6E6E6E"><FONT FACE="Arial,Helvetica" SIZE="" COLOR="#ffffff">
<B>Login</B></FONT></TD>
<TD NOWRAP bgcolor="#6E6E6E">
<FONT FACE="Arial,Helvetica" SIZE="" COLOR="#ffffff">
<B>Customer Name</B></FONT><font color="#FFFFFF"> </font>
</TD></TR>
%srch_rows%
</TABLE>
<TABLE WIDTH="100%">
<TR><TD ALIGN = "left" VALIGN = "middle" NOWRAP>
%prev_button%
</TD><TD ALIGN = "right" VALIGN = "middle" NOWRAP>
%next_button%
</TD></TR>
</TABLE>
%ELSE%
<p align="left"> <font face="Verdana" color="#6E6E6E">Your registry list is currently empty</font></p>
%IFEND%
<br>
</div></td>
</tr>
</table> </td>
</tr>
</table>
</div>
</body>
</html>
PCINET - Andreas
05-14-08, 10:27 PM
Okay, what does the page display? Always the TRUE part? Your syntax looks okay just the HTML code at the end is wrong. </body> </html> don't belong there.
vanessayr
05-14-08, 10:31 PM
If it contains something it displays it, if it doesn't it still displays the heading and at the beginning before even entering any search terms, it displays the message for no items found.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.