All questions about EDocman extension

*Exclude* categories in module Edocman documents

  • Gerlof Koopmans
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago #152512 by Gerlof Koopmans
*Exclude* categories in module Edocman documents was created by Gerlof Koopmans
Hi!

At the moment, it is only possible to show documents from all categories (field 'Categories IDs' empty) or include certain categories (enter IDs in field 'Categories IDs').
But I would like to *exclude* specific categories in order to hide some documents.

Which part of the code in mod_edocman_documents do I have to change in order to arrange this?

Thanks in advance!
Gerlof

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #152517 by Mr. Dam
Hi Gerlof,
Ok, it's good idea, in next Edocman version, we will add option to exclude categories in Edocman documents module
Thanks
Dam
The following user(s) said Thank You: Gerlof Koopmans

Please Log in or Create an account to join the conversation.

  • Gerlof Koopmans
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 6 months ago - 1 year 6 months ago #153517 by Gerlof Koopmans
Replied by Gerlof Koopmans on topic *Exclude* categories in module Edocman documents
Hi! I noticed that you added the option in the latest version. Many thanks!!
The parameter to exclude ID's is now added to the module, but in the frontend the documents from these category IDs still are not excluded. It looks like the code to achieve this, is missing in mod_edocman_documents.php. Maybe you have time to check this :)

Regards, Gerlof
Last edit: 1 year 6 months ago by Gerlof Koopmans. Reason: typo's

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #153569 by Mr. Dam
I confirm the problem, to solve the issue, please following below steps
1. Open file
[root] -> modules -> mod_edocman_documents -> mod_edocman_documents.php
2. Find:
Code:
$model->set('filter_category_ids',$categoryIds);

and add this below:
Code:
if($exclude_category_ids) {     $model->set('exclude_category_ids',$exclude_category_ids); }

Good luck
Dam

Please Log in or Create an account to join the conversation.

  • Gerlof Koopmans
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 6 months ago - 1 year 6 months ago #153599 by Gerlof Koopmans
Replied by Gerlof Koopmans on topic *Exclude* categories in module Edocman documents
Thanks for the additional code.
I notice a few problems after adding the code:
1) only adding *one* category in field 'Exclude Categories IDs' will exclude documents from that category
2) when entering *two* categories (comma separated), also documents from other categories are excluded
3) when entering *more than two* categories, no documents are shown at all
4) when entering (only) a main category, documents from sub categories will still show (tried both options Yes/No for 'Include Documents from Children Categories')
Last edit: 1 year 6 months ago by Gerlof Koopmans. Reason: typo

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #153600 by Mr. Dam
Hi Gerlof,
Currently, we only have option to exclude documents of entered categories. Could you please submit ticket on category: Edocman and provide your site url with super admin account. I will help you to check and fix the third issue "3) when entering *more than two* categories, no documents are shown at all"
Thanks
Dam

Please Log in or Create an account to join the conversation.

Moderators: Mr. Dam