Fix for pathway

Phoca Download - download manager
Xenon1170
Phoca Member
Phoca Member
Posts: 10
Joined: 23 Jan 2011, 13:58

Fix for pathway

Post by Xenon1170 »

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:

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);
			}
		}
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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Fix for pathway

Post by Jan »

Hi, thank you, I will fix it for the next release.

Jan
If you find Phoca extensions useful, please support the project
Post Reply