More in this section

Forums / Developing with Sitefinity / forum categories and forum sorting

forum categories and forum sorting

6 posts, 0 answered
  1. Muhammad Saqib
    Muhammad Saqib avatar
    95 posts
    Registered:
    09 Sep 2009
    14 Dec 2009
    Link to this post
    i just unable to sort categories of forum and forum inside category..although there is written
    "Here you can read, sort, edit and manage all forums."
    am i missing something :-s?
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    15 Dec 2009
    Link to this post
    Hi Muhammad Saqib,

    Thank you for using our services.

    You are not doing anything wrong. Unfortunately the Forums module does not have sorting of forum items in the back-end enabled. This means that there were no sorting methods implemented to handle sorting of the grid which displays the list of forums. Implementing this on your own would mean that you will have to develop your own forums module that inherits from Sitefinity Forums and then implement the sorting handlers in the back-end views for forums list. We are working on improving things like this in our next major version - Sitefinity 4.0 (expected early 2010)

    Please accept our apologies for the invonvenience, if you need some guidance on how to achieve the above we will happily provide you with such.

    Greetings,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Muhammad Saqib
    Muhammad Saqib avatar
    95 posts
    Registered:
    09 Sep 2009
    30 Dec 2009
    Link to this post
    Well... Its ok but I really want to take control over ordering of categories and forum .
    Can you help me in achieving this..
    Many Thanks in Advance

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    30 Dec 2009
    Link to this post
    Hello Muhammad Saqib,

    As Rado wrote, you need to implement sorting methods for the IForum objects, because the default ForumsManager does not implement them. You have to create a new module and data layer for it and then implement public abstract IList  that will return list of the filtered forum categories. The categories itself can be easily sorted ASC or DESC by using GetCategories(string sortExpr).

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Adeel Arif
    Adeel Arif avatar
    27 posts
    Registered:
    30 Dec 2009
    04 Jan 2010
    Link to this post
    Hi thanks a lot , I was struck in the same problem and i am really getting a picture in my head i am a bit new to sitefinity could you please explain it more or could you guide me through this process. I would be very thankful.

    Regards Adeel Arif.
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    04 Jan 2010
    Link to this post
    Hello Adeel Arif,

    Thank you for using our services.

    The problem here is that the Forums Manager does not have methods for sorting the forums based on some sorting criteria passed in the method calls. This means that when the Forums Manager class gets all forums from the data layer they are returned in the order the manager finds them. As Ivan has mentioned this requires a new module and a new data layer which when queried for forums will be able to return forums based on sort expressions. This will require some coding on your side - implement data layer, implement methods for CRUD operations in the data layer, as well as implementing the front end part of the module. We do have samples for creating custom modules you can check them out here:

    Sample intra site module: Contacts intra site module
    Sample pluggable module: Contacts pluggable module Sample Generic Content based module: Products module

    Regards,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered