Forum Discussion
5 Replies
- cike6 years agoChampion
Hi navya_0204,
use APIv2 to achieve this:
SELECT * FROM messages WHERE conversation.style = 'blog' AND labels.text IN ('label_1', 'label_2')
More about APIv2 can be found here.
Best regard
Christian
- navya_02046 years agoHelper
- navya_02046 years agoHelper
Here is our approach towards the retrieving labels from the TKB Page
<#assign labellist = restadmin("/boards/id/${coreNode.id}/labels?page_size=1000")/>
and want to implement the same approach to implement label filter for the forum and blog page.
Can anyone let me know how to retrieve the labels for blog page also for the forum page.
- cike6 years agoChampion
navya_0204 - With the API call you mentioned above you're able to get the labels for each type of board, no matter what type of conversation it is: If your coreNode is of type blog, you get labels for the blog node and so on.
If you want to get the labels for all nodes within a location (e.g. category) you can do something similar to this:
- Get all board IDs for your category (With this you have IDs for all your nodes, blogs, TKBs, ...)
- Loop through the list of IDs and use the API call above to get labels for each node.
- Aggregate all API responses (label lists) into one, so you have a complete list of all your labels.
While looping through elements and sending multiple API requests could be a time consuming task, I would assume using an endpoint to build the label list and request the endpoint from your custom component.
- navya_02046 years agoHelper
Thank you cike
Related Content
- 5 years ago
- 2 years ago