电脑技术学习

修改phpcms2008导航条中的分划符

dn001

导航条的分划符采用CSS进行控制对很多人来说觉得很难处理,并且无所适从.

一个简单的方法:

找到include/global.inc.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 .= '<a href="'.$url.'">'.$CATEGORY[$catid]['catname'].'</a>';

}

return $pos;

}
复制代码将其改为

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 .= '>><a href="'.$url.'">'.$CATEGORY[$catid]['catname'].'</a>';

}

return $pos;

}
复制代码若想插入图片或者其他符号则将>>改为<img src="你的图片地址" />即可

;