繁体   English   中英

带有Virtuemart购物车的Joomla面包屑

[英]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.

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