dede调用数据时,字符串替换函数使用

                     {dede:sql sql="SELECT typename,typedir,typeimg FROM #@__arctype where topid=30 limit 0,6"}
             <li><a href="[field:typedir function='str_replace("{cmspath}","",@me)'/]" alt="[field:typename/]" title="[field:typename/]"><img src="[field:typeimg/]"  alt="" title="" /></a>
        <a href="[field:typedir function='str_replace("{cmspath}","",@me)'/]" alt="[field:typename/]" title="[field:typename/]">[field:typename/]</a>
            </li>
                   {/dede:sql}
其中 function='str_replace("{cmspath}","",@me)'/]将
{cmspath}替换成空值
posted @ 2014-09-29 19:11  求必印  阅读(2359)  评论(0编辑  收藏  举报