Hi,
I use an extension CW Multicats that allows me to add an article to more than one category.
Now I installed Phoca Documentation (which is perfect for what I want it to do) and when I look at the categories, it only lists the first article that's listed in the article category section. Its ignores the second category - does phoca documentation uses its own database query to get an article list?
Eddie
Phoca Documentation and Multiple Article Categories
-
- Phoca Member
- Posts: 49
- Joined: 09 Sep 2009, 09:17
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Documentation and Multiple Article Categories
Hi, no, it just load all articles which are included in asked category
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 49
- Joined: 09 Sep 2009, 09:17
Re: Phoca Documentation and Multiple Article Categories
Hi Jan,
Thanks for the reply. Can you please verify what I have is correct so that I then can rule out the problem with Phoca Documentation.
One of the chaps from the sailing community emailed me the following but not sure if its relevant and if its pointing to Phoca Documentation or 3rd party software:
The point is, that it load articles with condition ...WHERE catid = $searched_category_id... which leads to fact that if catid is with multicategories lets say “2,6,23”, it will interpret it as integer – therefore just “2”, therefore it loads only from first assigned category. It will be needed to change the model of database query to WHERE FIND_IN_SET($catid, catid) ..which will search the searched_category_id in all assigned categories.
That is my guess.
Below setup on my site.
Here is my Joomla Categories:
Here is my Phoca Documentation Categories:
Here is my 1st article category selection:
Here is my 2nd article category selection:
Here is the list in my news section on my site:
When I click on European Class News, this is what I see (this belongs to 2 categories):
When I click on SFS News, this is what I see (this article belongs to 2 categories):
When I click on All News, this is what I see:
'All News' is the second Category for the 2 articles, if I swap the order around of the categories in the articles, then All News works, but not the 2 secondary categories.
Its as if it only recognizes the first article.
Thanks
Eddie
Thanks for the reply. Can you please verify what I have is correct so that I then can rule out the problem with Phoca Documentation.
One of the chaps from the sailing community emailed me the following but not sure if its relevant and if its pointing to Phoca Documentation or 3rd party software:
The point is, that it load articles with condition ...WHERE catid = $searched_category_id... which leads to fact that if catid is with multicategories lets say “2,6,23”, it will interpret it as integer – therefore just “2”, therefore it loads only from first assigned category. It will be needed to change the model of database query to WHERE FIND_IN_SET($catid, catid) ..which will search the searched_category_id in all assigned categories.
That is my guess.
Below setup on my site.
Here is my Joomla Categories:
Here is my Phoca Documentation Categories:
Here is my 1st article category selection:
Here is my 2nd article category selection:
Here is the list in my news section on my site:
When I click on European Class News, this is what I see (this belongs to 2 categories):
When I click on SFS News, this is what I see (this article belongs to 2 categories):
When I click on All News, this is what I see:
'All News' is the second Category for the 2 articles, if I swap the order around of the categories in the articles, then All News works, but not the 2 secondary categories.
Its as if it only recognizes the first article.
Thanks
Eddie
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Documentation and Multiple Article Categories
Hmm, I think, when you use some external extension for this, the code needs to be customized for it, I think
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 49
- Joined: 09 Sep 2009, 09:17
Re: Phoca Documentation and Multiple Article Categories
Hi Jan,
Thanks for the reply.
I am still not sure if this is an issue with Phoca Documentation or not.
Does this mean Phoca Documentation cant read Multiple Categories?
Thanks
Eddie
Thanks for the reply.
I am still not sure if this is an issue with Phoca Documentation or not.
Does this mean Phoca Documentation cant read Multiple Categories?
Thanks
Eddie
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Documentation and Multiple Article Categories
Hi, as written above, Phoca Documentation reads the Joomla! categories and displays articles which belong to this category. If you are using some external extension for some specific feature, then such needs to be solved in external extension.
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 49
- Joined: 09 Sep 2009, 09:17
Re: Phoca Documentation and Multiple Article Categories
Hi Jan,
Going back and forth between Phoca Documentation and 3rd party software this is the outcome:
Trying 2 different extensions to allow me to use Multiple categories, Phoca Documentation still would not read multiple categories. As this is now 2 extensions, I started looking at Phoca Documentation again and with some help from a friend we have done the following:
In 'components/com_phocadocumentation/models' we had to modify the category.php file and then it all worked .
See below changes that were made:
Can you please verify that the changes we made wont break anything else in Phoca Documentation
Thanks
Eddie
Going back and forth between Phoca Documentation and 3rd party software this is the outcome:
Trying 2 different extensions to allow me to use Multiple categories, Phoca Documentation still would not read multiple categories. As this is now 2 extensions, I started looking at Phoca Documentation again and with some help from a friend we have done the following:
In 'components/com_phocadocumentation/models' we had to modify the category.php file and then it all worked .
See below changes that were made:
Code: Select all
//$wheres[] = ' c.catid= '.(int)$categoryId;
$wheres[] = ' FIND_IN_SET('.(int)$categoryId.',c.catid)';
Thanks
Eddie
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Documentation and Multiple Article Categories
Hi, thank you for the info, for now I cannot confirm it as I need to do tests
Jan
Jan
If you find Phoca extensions useful, please support the project