Forum Discussion
Here's the latest iteration. This widget only shows topics without replies in the current board/category focus:
<#assign message_list_title = text.format("custom.top_five_threads_with_no_replies.title") /> <#assign results_list_size = 5 /> <#assign coreNodeType = coreNode.nodeType /> <#if coreNodeType == "board"> <#assign rest_query = "/boards/id/${coreNode.id}/search/messages?openresponse=true&sort_by=-topicPostDate&page_size=" + results_list_size /> <#elseif coreNodeType == "category"> <#assign rest_query = "/categories/id/${coreNode.id}/search/messages?openresponse=true&sort_by=-topicPostDate&page_size=" + results_list_size /> </#if> <div class="lia-panel lia-panel-standard top-five-threads-with-no-replies-wrapper"> <@component id="forums.widget.message-list-panel" title="${message_list_title}" messages="rest_v1:"+rest_query style="wide" numMessages="conv:"+results_list_size /> </div>
Thanks everyone, great thread.
I dont seem to be able to get this last set of code to work though.
Keep getting this:
"Expression rest_query is undefined on line 10, column 109 in preview. The problematic instruction: ---------- ==> user-directive component [on line 10, column 9 in preview]"
I am trying to put an Unanswered threads widget in the sidebar which is board specific.
Thanks for any and all help
- AdamN12 years agoKhoros Oracle
Do you get that error when you're previewing the component, or when you place it on the page? Based on the error message, it sounds like maybe that error is showing when you preview the component in Studio? If so, it's probably because the component doesn't have the proper context to operate properly. It could probably be changed to be more sensitive to those types of issues and avoid displaying an error, but if you try the component out on a board or category page, you may have better luck than in the preview.
Related Content
- 4 years ago
- 10 months ago
- 13 years agoInactive User
- 3 years ago