web design, England, Britain, UK, belgium
 
Ulti Clocks content

Double entry in Joomla Breadcrumbs with VirtueMart 1.1

sand 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

Home

vri

04

sep


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 {
 




Add this page to your favorite Social Bookmarking websites
Digg! Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! Slashdot! Technorati! StumbleUpon! Spurl! Newsvine! Furl! Fark! Yahoo! Netvouz! Mister-Wong! RawSugar! Ma.gnolia! Squidoo! DZone! Swik!
Laatste aanpassing op vrijdag 04 september 2009 19:28 Read : 4305 times
 
Comments (3)
it works
3 woensdag 03 maart 2010 09:56
it works
Mad Mad Mad Mad Mad Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Confused Confused Confused Confused Confused Confused Confused Confused Confused Confused Confused Confused Smile Smile Smile Smile Smile Smile Smile Smile
it works
2 dinsdag 15 december 2009 21:09
otis
thanks
jpageviews 3 digit issue
1 vrijdag 11 september 2009 15:06
Don
any chance of getting a response in the jpageviews forum? there's an issue been floating there for a few weeks.

Add your comment

BoldItalicUnderlineStrikethroughSubscriptSuperscriptEmailImageHyperlinkOrdered listUnordered listQuoteCodeHyperlink to the Article by its id
Very HappySmileWinkSadSurprisedShockedConfusedCoolLaughingMadRazzEmbarrassedCrying or Very SadEvil or Very MadTwisted EvilRolling EyesExclamationQuestionIdeaArrowNeutralMr. GreenGeekUber Geek
Your name:
Titel:
Comment:



Double entry in Joomla Breadcrumbs with VirtueMart 1.1



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