Section Showing Twice in Breadcrumbs

Phoca Download - download manager
arn34
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 19 Dec 2014, 16:48

Re: Section Showing Twice in Breadcrumbs

Post by arn34 »

I still encounter the same problem with joomla 3.3.6 and phoca download 3.0.6 : Category Subcategory Category Subcategory in breadcrumb.

Here is what I did to stop duplicate pathway in breadcrumb, I modified the file /components/com_phocadownload/views/category/view.html.php :

Code: Select all

// Breadcrumbs TODO (Add the whole tree)
		$pathway 		= $app->getPathway();
		/*if (isset($this->category[0]->parentid)) {
			if ($this->category[0]->parentid == 0) {
				// $pathway->addItem( JText::_('COM_PHOCADOWNLOAD_CATEGORIES'), JRoute::_(PhocaDownloadRoute::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::_(PhocaDownloadRoute::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);
			}
		}
And this worked perfectly.

Arnaud
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Section Showing Twice in Breadcrumbs

Post by Jan »

Hi, thank you very much for the info, I will take a look at it for the next version of Phoca Download.

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