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?

  • 259
  • More
Replies (7)
    • That's a great idea, Karina! Browsing by labels tree is a very effective way to find relevant content and context.

      • 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.

        

        • Thx @Alex T⚜️ , great code snippet!

          Is there a possibility to add the number of item using this label after the labelname too? Like:

          • LABEL (7)
          • FIRST SUB (2)
          • SECOND (2)
          • THIRD (3)
          • Sorry, there is no such functionality for now, counting involves recursion with privacy checking for each item, which is very resource intensive and slow.

            • 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?

              • 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.

                • ... keep it simple :)

                  Login or Join to comment.