dedecms列表页首页调用下载地址的办法总结

直接在include/helpers/extends.helps.php  最下面加个函数:

if ( ! function_exists('getlink')) { function getlink($dedetag){ //获得链接 $tmp = preg_split("/{*}/",$dedetag,-1,PREG_SPLIT_DELIM_CAPTURE); return substr($tmp[1],0,-11); } } 页面调用: {dede:arclist orderby='pubdate' orderway="desc" typeid='102,103,104,105' row='6' channelid="3" addfields='softlinks'} <li><a href=http://www.dede58.com/"[field:softlinks function='getlink(@me)'/]" class="down">Download</a><a href=http://www.dede58.com/"[field:softlinks/]">[field:title/]</a></li> {/dede:arclist}  

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/1ae31e4686cb1b8f4ebeb82539600388.html