Forum Discussion

kbulens's avatar
kbulens
Guide
11 years ago

Getting numbers out

Hi,

 

I need to get some numbers out to output, for ex. :
- X members
- X discussions

- X solved questions


Post specific (to put on the homepage):
- that specific topic has X answers and X kudo's

  • Well, then you need to see the basics first. Try finding the REST documentation on the forums here.

7 Replies

  • kbulens  You mean to strip off the text "members" from the "10 members" and display "10" only? Please clarify your exact requirement. I think you might not need to do this if you can get this from the REST response.

  • kbulens's avatar
    kbulens
    Guide
    11 years ago
    I want to know, in case of "10 members", how i get the 10 :)
  • VarunLuthra's avatar
    VarunLuthra
    Advisor
    11 years ago
    Are you creating a custom component to create a new widget? Though what you're looking for can be simply stripped off using jquery, but why do that when REST call will give you the number itself. Please post your code if you are creating a custom component.
  • kbulens's avatar
    kbulens
    Guide
    11 years ago
    <# user.registered.total /> members
    <# discussions.solved.total /> solved discussions

    ... for the items mentioned in the original post
    Off corse, goes without saying, the code above doesn't work :D
  • VarunLuthra's avatar
    VarunLuthra
    Advisor
    11 years ago
    This doesn't help me in understating what actually the problem is, can you post the REST call which you are making to get the results? posting the entire code wont be a bad idea.
  • kbulens's avatar
    kbulens
    Guide
    11 years ago
    well ... there is no rest of the code :) ... yet.

    I don't have any idea what you mean or how to use the REST call, i'm quite new to hte lithium boards
  • Well, then you need to see the basics first. Try finding the REST documentation on the forums here.