web design, England, Britain, UK, belgium
 

Double entry in Joomla Breadcrumbs with VirtueMart 1.1 - Joomla & VirtueMart Tips & How To's

When you make a normal VirtueMart category menu a double entry (iteration) appears in the Joomla breadcrumbs.

Home Joomla VirtueMart Tips Double entry in Joomla Breadcrumbs with VirtueMart 1.1

Fri

04

Sep

Double entry in Joomla Breadcrumbs with VirtueMart 1.1
  • Joomla 1.5
  • VirtueMart 1.1

When you make a normal VirtueMart category menu a double entry (iteration) appears in the Joomla breadcrumbs.
I found this solution in the VirtueMart forums.


Double entry in Joomla Breadcrumbs with VirtueMart 1.1




If you make a VirtueMart Category menu item via the standard Joomla menu dialogue the breadcrumbs will display a double entry (iteration) for that page.
Thanks to yzedesign for this solution.
It will only work if the menu item name is the same as the category name. It detects the double and drops one of them.

Go to administrator\components\com_virtuemart\classes\mainframe.class.php and find the function "function vmAppendPathway( $pathway )" around line 707 -
 
  function vmAppendPathway( $pathway ) {
 
    global $mainframe;
 
 
 
    // Remove the link on the last pathway item
 
    $pathway[ count($pathway) - 1 ]->link = '';
 
 
 
    if( vmIsJoomla('1.5') ) {
 
      $cmsPathway =& $mainframe->getPathway();
/***** YZEDESIGN HACK ******/
      $whatinpath=',';
      foreach( $cmsPathway->_pathway as $tabpath ) {
        $whatinpath.=','.$tabpath->name.',';
      }
/***** YZEDESIGN HACK ******/
 
      foreach( $pathway AS $item) {
        if (!stripos($whatinpath,','.$item->name.',')){ //********* YZEDESIGN HACK
 
        $cmsPathway->addItem( $item->name, str_replace('&', '&', $item->link) );
 
      }
  }//********* YZEDESIGN HACK
 
    } else {
 


Last Updated on Friday, 04 September 2009 19:28
 
VirtueMart
Your Cart is currently empty.



Double entry in Joomla Breadcrumbs with VirtueMart 1.1|Joomla & VirtueMart Tips & How To's



When you make a normal VirtueMart category menu a double entry (iteration) appears in the Joomla breadcrumbs.


pathway, item, virtuemart, yzedesign, hack, menu, link, cmspathway, whatinpath, joomla, category, double, function, mainframe, vmappendpathway, tabpath, foreach, iteration, entry, breadcrumbs, solution, global, replace, str, remove, count, line, stripos, getpathway, additem, vmisjoomla, administrator, dialogue, display, standard, forums, normal, appears, page, thanks

|

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.