Page 1 of 1
Navigation problem
Posted: 09 Mar 2016, 23:46
by sercio
Hi,
i have a problem about Navigation option.
I have a menu item with type Caterories list.
I click on the item and i can view the list of all the categories. I have activated navigation for categories and for imagins list in the menu item options.
When i click on a category, the page with the images have not the navigation but only 20 images and the back button, so i can't see all the images in a category.
In the title of the page i see Article - Category. Why Article?
Can you help me?
Re: Navigation problem
Posted: 10 Mar 2016, 14:14
by sercio
Hi,
i have found a lost parameter.
I create a menu item type Categories view.
the url is like this...
http://www.santaprisca.it/index.php?opt ... 72&lang=it
where Itemid param is the id of the menu entry and i have a list of my categories.
When i click on a category the url is like this
http://www.santaprisca.it/index.php?opt ... 03&lang=it
and there isn't the param Itemid, so the i have not the pagination and sort field because this features are defined into the Menu Item and i have lost this information in the url.
If i manually add the param in the url all work fine.
I think this is a bug...
Is it possible to fix it?
Re: Navigation problem
Posted: 10 Mar 2016, 19:08
by Jan
Hi, this seems to be related to the changes to find right ID when more that one menu link is created, please try to open this file:
administrator\components\com_phocagallery\libraries\phocagallery\path\route.php
and change
FROM:
Code: Select all
public static function getCategoryRoute($catid, $catidAlias = '') {
// TEST SOLUTION
$app = JFactory::getApplication();
$menu = $app->getMenu();
$active = $menu->getActive();
$option = $app->input->get( 'option', '', 'string' );
$activeId = 0;
if (isset($active->id)){
$activeId = $active->id;
}
if ((int)$activeId > 0 && $option == 'com_phocagallery') {
$needles = array(
'category' => (int)$catid,
'categories' => (int)$activeId
);
} else {
$needles = array(
'category' => (int)$catid,
'categories' => ''
);
}
if ($catidAlias != '') {
$catid = $catid . ':' . $catidAlias;
}
//Create the link
$link = 'index.php?option=com_phocagallery&view=category&id='. $catid;
if($item = PhocaGalleryRoute::_findItem($needles)) {
if(isset($item->query['layout'])) {
$link .= '&layout='.$item->query['layout'];
}
if (isset($item->id) && ((int)$item->id > 0)) {
$link .= '&Itemid='.$item->id;
}
};
return $link;
}
TO:
Code: Select all
public static function getCategoryRoute($catid, $catidAlias = '') {
// TEST SOLUTION
$app = JFactory::getApplication();
$menu = $app->getMenu();
$active = $menu->getActive();
$option = $app->input->get( 'option', '', 'string' );
$activeId = 0;
$notCheckId = 0;
if (isset($active->id)){
$activeId = $active->id;
}
if ((int)$activeId > 0 && $option == 'com_phocagallery') {
$needles = array(
'category' => (int)$catid,
'categories' => (int)$activeId
);
$notCheckId = 1;// when categories view, do not check id
} else {
$needles = array(
'category' => (int)$catid,
'categories' => ''
);
$notCheckId = 0;
}
if ($catidAlias != '') {
$catid = $catid . ':' . $catidAlias;
}
//Create the link
$link = 'index.php?option=com_phocagallery&view=category&id='. $catid;
if($item = PhocaGalleryRoute::_findItem($needles, $notCheckId)) {
if(isset($item->query['layout'])) {
$link .= '&layout='.$item->query['layout'];
}
if (isset($item->id) && ((int)$item->id > 0)) {
$link .= '&Itemid='.$item->id;
}
};
return $link;
}
And let me know if it works for you, when yes, I will change it for the next release.
Thank you, Jan
Re: Navigation problem
Posted: 13 Mar 2016, 15:36
by sercio
Hi Jan,
It's work fine.
Thank you very much
Re: Navigation problem
Posted: 15 Mar 2016, 22:48
by Jan
Ok
Re: Navigation problem
Posted: 16 May 2016, 15:01
by Jan
Hi, set in version 4.3.0
Jan
Re: Navigation problem
Posted: 25 Jan 2017, 23:00
by sercio
Hi,
i have update to 4.3.4 and plugin 4.3.1 and now I have the problem again....
Re: Navigation problem
Posted: 25 Jan 2017, 23:09
by sercio
I have replaced the route.php code again.... now work fine. Please modify the distribution........
Thanks
Re: Navigation problem
Posted: 27 Jan 2017, 19:28
by Jan
"replaced the route.php code again"? Which code you have used? The one listed here is stored in latest version
Jan