欢迎来到奥多码

dedecms当前位置(面包屑)各种写法

日期: 2020-06-30 12:02:29

方法一.Dedecms当前位置:
 
<span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:14px;">{dede:field name='position'/}</span></span>
 
方法二:
 
<span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:14px;">{dede:field name='position' runphp='yes'}
          $a=mb_strlen(@me);//计算字符串的长度
          @me=cn_substr(@me,$a-2,-1);//截取字符
         {/dede:field}</span></span>
 
(这是去掉“去掉>”得得方法)
 
方法三.、{dede:field name='position'/} 中去掉 > 并去掉最后一个文本的链接的解决方案
 
<span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:14px;">   {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}</span></span>
 
如果还需要分隔符的话,就把$tl=$tl.$tf[$iij]; 换成
$tl=$tl."空格分隔符空格".$tf[$iij];
 
方法四.您当前所在的位置:
 
<span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:14px;"><a href="/">本站首页</a> >{dede:channel type='top' currentstyle="
             <a href='~typelink~'>~typename~</a>
              "}
              {/dede:channel} ></span></span>
 

上一篇:dedecms判断使用方面 [field:global runphp='yes' name=autoindex]

下一篇:DEDECMS让文章的大图片不破坏布局

  • 在线客服

    官方微信

    仅处理投诉、举报及平台使用问题;
    商品问题请咨询商家客服!

浏览记录