Author Topic: Hide empty categories  (Read 263 times)

Pawel

  • Jr. Member
  • *
  • Posts: 73
Hide empty categories
« on: January 31, 2021, 12:02:11 AM »
How can I hide empty categories in IMatchViewer?

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 27956
Re: Hide empty categories
« Reply #1 on: January 31, 2021, 11:33:28 AM »
No. Usually, empty categories are rare...?

Pawel

  • Jr. Member
  • *
  • Posts: 73
Re: Hide empty categories
« Reply #2 on: January 31, 2021, 11:48:25 AM »
I want to show different events to different user groups (like family, coworkers etc.) so I created group ACL

Category Include '^Event'
Category Exclude 'IMatch Anywhere\|Group1\|hidden'

and now IMA correctly hides unwanted files from the group, however there are many empty categories displayed.

I know I can do it differently like set a category filter for a "Event" category however I will have to duplicate the Event category for each group. I thought hiding the empty "Events" would be easier - I would have one "Event" category and three "hidden" categories.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 27956
Re: Hide empty categories
« Reply #3 on: January 31, 2021, 02:09:50 PM »
When I understand you correctly, you are producing these empty categories by the way you structured your access control lists for your user groups, correct?

Just hiding empty categories won't work all too well. A category may be empty, but users may still want to assign files to it. Many projects start with a list of categories for the users to fill...
Have you considered using ACL control lists based on categories? This allows you to hide categories from users.

Pawel

  • Jr. Member
  • *
  • Posts: 73
Re: Hide empty categories
« Reply #4 on: February 01, 2021, 02:59:13 AM »
Not exactly.

I have photos assigned to various events within Event category, like:
  • Event\2020-07-02 some event
  • Event\2020-07-04 another event
  • Event\2020-08-04 and another event
  • Event\2020-08-07 and so on
Now to show only photos belonging to certain (not all) events to members of a user group I've set up a "include" category, where I added photos I want to show, and a category named "hidden" with formula @All NOT "include".
Now the category access list:
  • Include '^Event'
  • Exclude 'IMatch Anywhere\|Group1\|hidden'
works in a way that the files are hidden correctly however all the event categories are visible - just lots of them empty (those containing only excluded photos).

Anyway, if there is no easy way to hide those empty (filescount = 0) categories within IMatchViewer I will try to acheve my goal (to show only certain events to certain poeple) differently. :)
« Last Edit: February 01, 2021, 03:01:40 AM by Pawel »

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 27956
Re: Hide empty categories
« Reply #5 on: February 01, 2021, 09:26:44 AM »
You can hide categories via ACLs.