Heim  >  Artikel  >  php教程  >  PHPCMS2008的导航位置修改

PHPCMS2008的导航位置修改

WBOY
WBOYOriginal
2016-06-13 10:56:16850Durchsuche

要的效果:

当前所在位置:

 

您当前所在位置:首页>>产品>>蒲公英系列>>服装管理系统>>产品详情

 

但放入调用标签:

 

您当前所在位置:首页>>{catpos($r['catid'])}产品详情

 

得到的效果是:

 

首页>>产品蒲公英系列>>服装管理系统>>产品详情

 

少了>>

 

汗,看了下global.func.php文件发现这段:

 

function catpos($catid, $urlrule = '')

{

     global $CATEGORY;

     if(!isset($CATEGORY[$catid])) return '';

     $pos = '';

     $arrparentid = array_filter(explode(',', $CATEGORY[$catid]['arrparentid'].','.$catid));

     foreach($arrparentid as $catid)

     {

         if($urlrule) eval("\$url = \"$urlrule\";");

         else $url = $CATEGORY[$catid]['url'];

         $pos .= ''.$CATEGORY[$catid]['catname'].''.'>>';

     }

     return $pos;

}

 

红色部分以前是没有的!加上去后,得以实现想要的效果!

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn