![](/img/trans.png)
[英]Virtuemart Add To Cart button on browse page for Virtuemart 2/Joomla 2.5.4
[英]Joomla breadcrumbs with Virtuemart Cart
當我單擊購物車鏈接時。 面包屑顯示了可疑的鏈接標題,如所附的標題:
這是我的代碼:
<?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>
如何消除第一個uRL?
試試這個
if($i!=0){
if($list[$i - 1]->name != $list[$i]->name){
echo '<li>'.$list[$i]->name.'</li>';
echo $separator;
}
}
這僅發生在此頁面的另一種方式,那么您可以使用jQuery刪除第一個li
找到第n個子選項並將其刪除。
希望這對您有幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.