Home > php教程 > php手册 > body text

PHPCMS2008的导航位置修改

WBOY
Release: 2016-06-13 10:56:16
Original
856 people have browsed it

要的效果:

当前所在位置:

 

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

 

但放入调用标签:

 

您当前所在位置:首页>>{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;

}

 

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

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!