Forum Discussion
Hi Roisin,
Unfortunately there is currently not a way to store a label hierarchy/taxonomy in the community. If you could maintain the hierarchy yourself (which I imagine you probably already do), you might want to try using labels on community posts to tag your posts with leaf-nodes in the hierarchy and then use a Lithium REST API v2 call that constrains by the labels.text field to find messages that match on one of the labels in your group.
For example, let's say you have a group called "footwear" and in that group you have "running_shoes", "dress_shoes", "sandals", and "slippers". If you want to search for any community posts that match "footware", you look up all the labels you have stored (in your own hierarchy) and create a LiQL query that finds messages that are labeled with any of the leaf-nodes in that group, which in this example would be something like:
SELECT id, subject, body, author FROM messages WHERE labels.text IN ('running_shoes', 'dress_shoes', 'sandals', 'slippers')
-Doug
Related Content
- 4 years ago
- 4 years ago
- 2 years ago
- 9 years ago