商务e功能强大,只要懂得要门,在制作上灵活运用,即可实现很多复杂的功能。
第一招:定义变量【接收值】
以定义newsID为例子,只要更改这个名称即可。
<#if RequestParameters["newsID"]?exists> <#assign newsID>${RequestParameters["newsID"]}</#assign> <#else> <#assign newsID="" /> </#if>
第二招:判断
<#if row.small?has_content> 满足条件实现的效果 <#else> 否则显示的效果 </#if>
<#if introID="49177"> 满足条件实现的效果 <#else> 否则显示的效果 </#if>
更复杂一些的:
<#if introID="49177"> 满足条件实现的效果 <#elseif introID="49176"> 否则显示的效果 </#if>
第三招:sqlwhere 产品搜索自定义
<form action="introduce029.html?proTypeID=179330" method="post" name="searchForm">
<input type="text" name="feedback_position" maxlength="20" value="" id="starttime2" onClick="setday(this)" runat="server"> <a href="#" onClick="document.searchForm.submit();return false;"><img src="${images}images/02/search.gif" border="0" /></a> <input type="hidden" name="type" value="p"> </form>
<#if feedback_position?has_content> <#assign sql>name301 = '${feedback_position}'</#assign> <#else> <#assign sql = "" /> </#if> <@mytag.ListProducts name="newsrows" sqlWhere="${sql}" orderby=" sortid asc,id desc" ctid="100224" proTypeID="${proTypeID}" pageMax="30"/>
|