Browse by Label
We have a block in Groups for Browse by Label and Label Tree. It's quite convenient for users who tag their groups with multiple labels and then users can find it with the labels. Do we have similar blocks for Events and Persons?
-
- · thomlin
- ·
That's a great idea, Karina! Browsing by labels tree is a very effective way to find relevant content and context.
-
-
·
Alex T⚜️
- ·
You can add "Browse by Label" and "Label Tree" blocks for any content module, just add "service" block in Studio > Developer > Pages to the desired page with the following code:
array ( 'module' => 'bx_events', 'method' => 'get_lables_tree', )
or with the following code for "Browse By Labels":
array ( 'module' => 'bx_events', 'method' => 'browse_by_label', )
just replace module name with "bx_persons", or any other content module.
-
·
Alex T⚜️
-
-
-
·
Alex T⚜️
-
·
In reply to Peter
- ·
Sorry, there is no such functionality for now, counting involves recursion with privacy checking for each item, which is very resource intensive and slow.
-
·
Alex T⚜️
-
- · Karina
-
·
In reply to Alex T⚜️
- ·
Hi @Alex T⚜️ ! Thank you for sharing this code! For the browse by labels bx_persons (without imposing any filter on it as yet) this block takes it from "New persons". Is there a way for the block show Active Persons by default instead?
-
- · Karina
- ·
Has anyone been able to test the "browse by labels" function when there is a lot of content? I tried it with my persons- and when you first click a label from the label tree, it's fine, but then if there is a lot of content and you need to go onto "the next page" so to speak, it gets confused, and stops filtering.
-
- · Peter
-
·
In reply to Karina
K
- ·
... keep it simple :)