dede標簽當前位置的各種寫法


方法一.Dedecms當前位置{dede:field name='position'/}

方法二.dede:field name='position' runphp='yes'}
          $a=mb_strlen(@me);//計算字符串的長度
          @me=cn_substr(@me,$a-2,-1);//截取字符
         {/dede:field}

(這是去掉“去掉>”得得方法)

方法三.、{dede:field name='position'/} 中去掉 > 並去掉最后一個文本的鏈接的解決方案
     {dede:field name='position' runphp='yes'}
    $tc=" > ";                  
    $tf=split($tc,@me);                        
    $tn=count($tf);
    for($iij=0;$iij<($tn-1);$iij++){
        if($iij==($tn-2)){$tf[$iij]=strip_tags($tf[$iij]);}
        $tl=$tl.$tf[$iij];
    }
    @me=$tl;
   echo @me;
{/dede:field}
如果還需要分隔符的話,就把$tl=$tl.$tf[$iij]; 換成
$tl=$tl."空格分隔符空格".$tf[$iij];

方法四.

    您當前所在的位置:<a href="/">本站首頁</a> >{dede:channel type='top' currentApple-converted-space"> <a href='~typelink~'>~typename~</a>               "}               {/dede:channel} >

方法五.dede:channel currentApple-converted-space"> <a href='#'>~typename~</a>               "}               {/dede:channel}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM