Try our conversational search powered by Generative AI!

Foum: Sorting topics by Announcement, Prioritized etc


What's the best practice for getting the forums, rooms and topics listed according to those parameters? The programmers manual and the admin lets us set these parameters, but there is no examples on how to retrieve the data in some sensible way (I know I complain a lot about the lack of documentation and example code but it't my opininon). I use

this.repeaterForumTopics.DataSource = ForumHandler.GetRoom(RoomID).GetTopics(page, Utils.PAGE_SIZE_NORMAL, out totalItems, new TopicSortOrder(TopicSortField.Created, SortingDirection.Ascending) );

today, but this is a brute force "get all" method. I'm thinking of lookin into the Query methods, but is this the way to go? Are there any working examples i can look at?


Sep 24, 2008 9:50

Hi Marius,

The topics are automatically prioritized by Announcement, Prioritized (sticky), Normal topic - no matter the sort order you specify.

Passing TopicSortField.LastReply (Descending) will also sort the topics based on LastReply, Changed, Created, resulting in a common forum listing where the topic with the most recent change end up on top. 

Sep 24, 2008 13:11
Thanks for that answer! I suggest you copy paste what you wrote into the programmers manual or the SDK asap!
Sep 24, 2008 15:36
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.