Forum Discussion

martinmichniak's avatar
martinmichniak
Contributor
13 years ago

Displaying solved threads only

Hello everybody,

 

I'm new to Lithium and to REST API and I need to have a filtering option to filter forum threads by solved / unsolved (so only threads with solved posts will be displayed).

 

My basic idea is to create a new custom component, where I want to use javascript with calling some function when option "Show Solved" will be selected, where the REST call would take place. But I don't know what to call or how to call a REST query.

 

I went through Lithium REST API documentation, but without finding any help for me. Is there any way how to achieve this, please?

 

Thank you for your help and for your response.

    • martinmichniak's avatar
      martinmichniak
      Contributor
      Thank you very much for your quick answer. I am afraid that this will not solve my problem, or I am doing something wrong or I don't understand it in the right way. I have tried to change the code a little bit (to display threads marked as solved only), but it was not successful...

      I need to have this inside lithium, so this functionality would replace all the threads displayed originally, only solved threads will be displayed, with all info - author, date, number of replies, pagination, etc.

      I was not successful with changing your suggested code... I don't need to have this on external page, just right in lithium...
      • xorrkaz's avatar
        xorrkaz
        Genius

        My example is an in-Lithium solution.  It creates a custom widget to display threads.  My widget displays threads that have not been solved or that have no replies.  You could reverse the logic to show those threads which are closed.  However, that widget doesn't replace the default Lithium thread display widget.  You could rebuild that widget if you wanted, though.  You can use the Freemarker and REST calls to extract the per-thread data and list the attributes you describe (i.e. author, date, number of replies).  My widget does not do that.  It is quite simple.  See the attached screenshot.


        Screen Shot 2011-11-09 at 9.57.49 AM.png