码库记事本

码库记事本

dede判断是否有下载链接或官网链接

小诸哥 0

目的: 判断是否有下载链接和判断是否有官网链接,如果没有就显示不同的图标和不能点击跳转。 实现代码:

<div class="btn-group btn-group-justified m-b {dede:field.baiduyun runphp='yes'}if(@me =='')[email protected]='normal-cursor';[email protected]='';}{/dede:field.baiduyun}">               
<a href="{dede:field.baiduyun/}" class="btn btn-success btn-rounded">                
<i class="{dede:field.baiduyun runphp='yes'}if(@me =='')[email protected]='fa fa-times';[email protected]='icon-cloud-download';}{/dede:field.baiduyun}"></i> 百度云              
</a>              
<a {dede:field.guanwang runphp='yes'}if(@me =='')[email protected]='';[email protected]='"href=/"[email protected]'/"';}
{/dede:field.guanwang} class="btn btn-dark btn-rounded {dede:field.guanwang runphp='yes'}if(@me =='')[email protected]='normal-cursor';[email protected]='';}
{/dede:field.guanwang}">                
<i class="{dede:field.guanwang runphp='yes'}if(@me =='')[email protected]='fa fa-eye-slash';[email protected]='fa fa-eye';}
{/dede:field.guanwang}"></i> 官网/Store              
</a>            
</div>

主要代码:

{dede:field.baiduyun runphp='yes'}if(@me =='')[email protected]='normal-cursor';[email protected]='';}
{/dede:field.baiduyun}

标签: dede