去掉DEDE中自定义附件类型字段调用后的TABLE标签
<table width='300'> <tr> <td height='30' width='20'><a href='/uploads/soft/100602/1-10060221235523434.zip' target='_blank'><img src='~cfg_phpurl~/img/addon.gif'border='0' align='center'></a></td><td><a href='/uploads/soft/100602/1-100602212355.zip'target='_blank'><u>/uploads/soft/100602/1-10060221235523434.zip</u></a></td> <tr></table>我们在系统内容模型中添加附件类型字段时,前台需要用{dede:field name='字段名'/}来调用。 例如我在后台发布一篇文章,上传一个zip的附件,字段的时间内容是:'/uploads/soft/100602/1-10060221235523434.zip',而前台则显示下面的内容。
<table width='300'> <tr> <td height='30' width='20'><a href='/uploads/soft/100602/1-10060221235523434.zip' target='_blank'><img src='~cfg_phpurl~/img/addon.gif'border='0' align='center'></a></td> <td><a href='/uploads/soft/100602/1-100602212355.zip'target='_blank'><u>/uploads/soft/100602/1-10060221235523434.zip</u></a></td> <tr> </table>
而我只想调用'/uploads/100602/1-10060221235523434.zip',怎么办? 下面就是去除多余table代码的修改方法: 1、打开文件 /templets/system/channel_addon.htm 2、把里面的代码全都删掉,只写~link~即可。 方法二:
{dede:field.字段名 runphp='yes'} @me=strip_tags(@me); {/dede:field.字段名}