插件名稱:官方商城插件 這種價格區(qū)間 判斷當(dāng)前選中高亮 應(yīng)該怎么寫判斷語句呢?
{php $price=array('0,500'=>'0-500元','500,1000'=>'500-1000元','1000,3000'=>'1000-3000元','3000,5000'=>'3000-5000元','5000,10000'=>'5000-10000元','10000,0'=>'10000元以上');}
<a href="{Router::search_url($params, 'price', NULL)}" {if 判斷條件} class="redcur" {else} class=" "{/if}>全部</a>
{loop $price $i $t}
<a href="{Router::search_url($params, 'price', $i)}" {if 判斷條件 } class="redcur"{else} class=" "{/if}>{$t}</a>
{/loop}
{php $price=array('0,500'=>'0-500元','500,1000'=>'500-1000元','1000,3000'=>'1000-3000元','3000,5000'=>'3000-5000元','5000,10000'=>'5000-10000元','10000,0'=>'10000元以上');} <a target="_blank" href="{Router::search_url($params, 'price', NULL)}" {if !$params.price} class="redcur" {else} class=" "{/if}>全部</a> {loop $price $i $t} <a target="_blank" href="{Router::search_url($params, 'price', $i)}" {if $params.price == $i} class="redcur"{else} class=" "{/if}>{$t}</a> {/loop}開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!