Fix for pathway
Posted: 12 May 2011, 16:33
In phoca download 2.00 for joomla 1.6 pathway is repeating menu item and category, e.g.
If i have a menu item saying "Downloads", when i click on it, I'll go to category downloads, but I will have 2 "downloads" item in my pathway.
Here is a code to fix this:
Replace this in file components/com_phocadownload/views/category/view.html.php
OR
Dowload the whole file from http://www.xenon1170.com/en/downloads-en.html and overwrite it.
If i have a menu item saying "Downloads", when i click on it, I'll go to category downloads, but I will have 2 "downloads" item in my pathway.
Here is a code to fix this:
Code: Select all
$pathway = $app->getPathway();
if (isset($this->category[0]->parentid)) {
if ($this->category[0]->parentid == 0) {
// $pathway->addItem( JText::_('COM_PHOCADOWNLOAD_CATEGORIES'), JRoute::_(PhocaDownloadHelperRoute::getCategoriesRoute()));
} else if ($this->category[0]->parentid > 0) {
$curpath = $pathway->getPathwayNames();
if($this->category[0]->parenttitle != $curpath[count($curpath)-1]){
$pathway->addItem($this->category[0]->parenttitle, JRoute::_(PhocaDownloadHelperRoute::getCategoryRoute($this->category[0]->parentid, $this->category[0]->parentalias)));
}
}
}
if (!empty($this->category[0]->title)) {
$curpath = $pathway->getPathwayNames();
if($this->category[0]->title != $curpath[count($curpath)-1]){
$pathway->addItem($this->category[0]->title);
}
}
OR
Dowload the whole file from http://www.xenon1170.com/en/downloads-en.html and overwrite it.