Forum Discussion
Hi Gursimrat,
rather than via REST, have you tried using the coreNode context object? I think you should be able to retrieve this information by looking for the ID of the coreNode or by looking up at its ancestors.
The documentation can be found here
Regards,
- Gursimrat12 years agoLeaderUsing ${coreNode.ancestors} gives FreeMarker template errorSign in to react to this post
- PaoloT12 years agoLithium Alumni (Retired)
That's very odd - it should be fine when called from the context of a board. What error are you getting? Please keep in mind that ancestors is an array so you would need to look into the array elements to find out the information around the node's ancestors.
For example:
${coreNode.ancestors[0].id}Would return the id of the first ancestor.
Sign in to react to this post
- Gursimrat12 years agoLeader
Or is there any widget in Lithium which can display the boards in the current category?
Lets say Category Animals has boards Tiger, Horse, Rhino, Lion, Elephant etc and when I am inside Board Horse, I should be able to see the other 4 boards inside Animals Category.
Thanks
Sign in to react to this post- AdamN12 years agoKhoros Alumni (Retired)
Here are a couple more examples of working with coreNode.ancestors that might give you some ideas:
Sign in to react to this post - sunny_mody12 years agoAdvisorI think you would need to make a custom component and get the category id using ${coreNode.ancestors[0].id}, then get the boards from this category using rest api (/restapi/vc/categories/id/${coreNode.ancestors[0].id}) and parse the response to get all boards.
You would surely need to eliminate the board which are currently on, this can be done using some freemarker logic.
ThanksSign in to react to this post