How to show empty categories in the discussions categories block?
Hello,
The discussions categories block only shows categories with posts. Empty categories are hidden. How to show all the categories, whether they are empty or not, as it's done with other modules categories?
The same applies with Posts, Ads, Articles & News (from AQB), Files, Glossary, Polls, Photos, Videos categories. Empty ones are hidden. I would like to show them all. SOther modules like Courses, Events, Organizations etc already show empty categories in the categories block.
Thanks
-
- · OneEagle
- ·
Hello UNA Team. Any help on this?
-
-
·
LeonidS
-
·
In reply to OneEagle
- ·
Hello !
You need to add the argument 'show_empty_categories' => true, to the code for the categories block it will lo0ok like:
array ( 'module' => 'system', 'method' => 'categories_list', 'params' => array ( 0 => 'bx_forum_cats', 1 => array ( 'show_empty' => true, 'show_empty_categories' => true, ), ), 'class' => 'TemplServiceCategory', )
-
·
LeonidS
-
- · OneEagle
-
·
In reply to LeonidS
- ·
Hi @LeonidS . Thanks for your reply. Where should I aplly the change: injection, raw block? Or should I modify the source code? And the change will be lost when the system updates, right?
-
-
·
LeonidS
-
·
In reply to OneEagle
- ·
You may create the service block with this code. And it will not be lost after the upgrade.
-
·
LeonidS