简体   繁体   English

带有Virtuemart购物车的Joomla面包屑

[英]Joomla breadcrumbs with Virtuemart Cart

When i click the shopping cart link. 当我单击购物车链接时。 The breadcrumbs displays doble link titles like the one attached: 面包屑显示了可疑的链接标题,如所附的标题: 面包屑

and here is my code: 这是我的代码:

    <?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>

how can i eliminate the first uRL? 如何消除第一个uRL?

Try something like this 试试这个

if($i!=0){

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

Another way this only happen in this page then you can remove the first li using jQuery 这仅发生在此页面的另一种方式,那么您可以使用jQuery删除第一个li

find the nth child option and remove It. 找到第n个子选项并将其删除。

Hope this may help you.. 希望这对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM