Столкнулся с таким косяком: при использовании стандартного модуля меню Joomla для вывода категорий виртумарта (тип пункта меню - Virtuemart), возникает ошибка в модуле breadcrumbs (Путь по сайту). Ошибка заключается в дублировании модулем категории два раза: к примеру вместо "Каталог - Плюшевые медведи - розовые" он пишет "Каталог - плюшевые медведи - розовые - плюшевые медведи - розовые". Немного полазив по буржуйским форумам нашел решение
Открываем файл administratorcomponentscom_virtuemartclassesmainframe.class.php, находим 390 строку и меняем
1 2 3 4 5 | 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(); foreach( $pathway AS $item) { $item->link = str_replace('&', '&', $item->link); // make sure that ' (apostrophe) is converted to ' $item->name = html_entity_decode( $item->name, ENT_QUOTES ); $cmsPathway->addItem( $item->name, $item->link ); } } else { $tpl = vmTemplate::getInstance(); $tpl->set( 'pathway', $pathway ); $vmPathway = $tpl->fetch( 'common/pathway.tpl.php' ); $mainframe->appendPathWay( $vmPathway ); }} |
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(); foreach( $pathway AS $item) { $item->link = str_replace('&', '&', $item->link); // make sure that ' (apostrophe) is converted to ' $item->name = html_entity_decode( $item->name, ENT_QUOTES ); $cmsPathway->addItem( $item->name, $item->link ); } } else { $tpl = vmTemplate::getInstance(); $tpl->set( 'pathway', $pathway ); $vmPathway = $tpl->fetch( 'common/pathway.tpl.php' ); $mainframe->appendPathWay( $vmPathway ); }}на
1 2 3 4 5 | 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('&', '&', basename($item->link)) ); } } } else { $tpl = vmTemplate::getInstance(); $tpl->set( 'pathway', $pathway ); $vmPathway = $tpl->fetch( 'common/pathway.tpl.php' ); $mainframe->appendPathWay( $vmPathway ); } } |
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('&', '&', basename($item->link)) ); } } } else { $tpl = vmTemplate::getInstance(); $tpl->set( 'pathway', $pathway ); $vmPathway = $tpl->fetch( 'common/pathway.tpl.php' ); $mainframe->appendPathWay( $vmPathway ); } }