2013-01-02 50 views
1

當我點擊購物車鏈接。像一個麪包屑顯示雙人間鏈接標題附:breadcrumbsJoomla麪包屑與Virtuemart購物車

這裏是我的代碼:

<?php // no direct access 
defined('_JEXEC') or die('Restricted access'); ?> 
<div class="breadcrumb"> 
<span class="left"></span> 
<ul> 
<?php for ($i = 0; $i < $count; $i ++) : 

// If not the last item in the breadcrumbs add the separator 
if ($i < $count -1){ 
if(!empty($list[$i]->link)) { 
echo '<li><a href="'.$list[$i]->link.'" class="pathway">'.$list[$i]->name.'</a></li>'; 
} else { 
echo '<li>'.$list[$i]->name.'</li>'; 
} 
//echo ' '.$separator.' '; 
}else if ($params->get('showLast', 1)) 
{ // when $i == $count -1 and 'showLast' is true 
    echo '<li>'.$list[$i]->name.'</li>'; 
} 
endfor; ?> 
</ul> 
<span class="right"></span> 
</div> 

怎樣消除第一網址是什麼?

回答

0

嘗試是這樣的

if($i!=0){ 

    if($list[$i - 1]->name != $list[$i]->name){ 
    echo '<li>'.$list[$i]->name.'</li>'; 
    echo $separator; 
    } 
} 

另一種方式這隻有在這個頁面結果,那麼你可以刪除使用jQuery

找到第n個子選項,將其取下第一華里。

希望這可以幫到你..

相關問題