phpcms编辑导航当前位置{catpos($r['catid'])}

找到文件/phpcms/libs/functions/ global.func.php文件,再找到如下代码:

  1. function catpos($catid, $urlrule = '') 
  2. { 
  3.         global $CATEGORY; 
  4.         if(!isset($CATEGORY[$catid])) return ''; 
  5.         $pos = ''; 
  6.         $arrparentid = array_filter(explode(',', $CATEGORY[$catid]['arrparentid'].','.$catid)); 
  7.         foreach($arrparentid as $catid) 
  8.         { //phpfensi.com 
  9.                 if($urlrule) eval_r("/$url = /"$urlrule/";"); 
  10.                 else $url = $CATEGORY[$catid]['url']; 
  11.                 $pos .= ''.$CATEGORY[$catid]['catname'].''; 
  12.         } 
  13.         return $pos; 
  14. } 

此函数即为控制所在位置的,你需要加的就加到:

'.$CATEGORY[$catid]['catname'].'

这里,比如我加>>,就加成:$pos .= ''.$CATEGORY[$catid]['catname'].'>>';