Page 1 of 1

Phoca Documentation and Multiple Article Categories

Posted: 22 May 2014, 10:05
by propolis
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 :)

Re: Phoca Documentation and Multiple Article Categories

Posted: 23 May 2014, 00:52
by Jan
Hi, no, it just load all articles which are included in asked category :idea:

Jan

Re: Phoca Documentation and Multiple Article Categories

Posted: 23 May 2014, 11:26
by propolis
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:
Image


Here is my Phoca Documentation Categories:
Image


Here is my 1st article category selection:
Image


Here is my 2nd article category selection:
Image


Here is the list in my news section on my site:
Image


When I click on European Class News, this is what I see (this belongs to 2 categories):
Image


When I click on SFS News, this is what I see (this article belongs to 2 categories):
Image


When I click on All News, this is what I see:
Image

'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

Re: Phoca Documentation and Multiple Article Categories

Posted: 24 May 2014, 01:40
by Jan
Hmm, I think, when you use some external extension for this, the code needs to be customized for it, I think :idea:

Jan

Re: Phoca Documentation and Multiple Article Categories

Posted: 24 May 2014, 10:15
by propolis
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

Re: Phoca Documentation and Multiple Article Categories

Posted: 26 May 2014, 00:18
by Jan
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.

Re: Phoca Documentation and Multiple Article Categories

Posted: 29 May 2014, 11:22
by propolis
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 :D .

See below changes that were made:

Code: Select all

//$wheres[]	= ' c.catid= '.(int)$categoryId;        
$wheres[]	= ' FIND_IN_SET('.(int)$categoryId.',c.catid)';
Can you please verify that the changes we made wont break anything else in Phoca Documentation

Thanks

Eddie

Re: Phoca Documentation and Multiple Article Categories

Posted: 29 May 2014, 22:27
by Jan
Hi, thank you for the info, for now I cannot confirm it as I need to do tests :idea:

Jan