Forum Discussion

HaikuBT's avatar
HaikuBT
Adept
14 years ago

Freemarker random functionality

Hello,

 

I'm trying to create a simple engagement app for my community that would randomly display words drawn from a database that I create.

 

Would Freemarker be the best way to do this? If so, I'm wondering where I might find the proper code.

 

Also, how might I get my world list into the database? 

 

Thanks for any help anyone can provide!

 

Bonnie

  • I guess it would depend on what the user experience will be.  If you want something a bit more dynamic than what server-sided scripting will provide, Javascript/jQuery might be the better choice.  If you don't have a lot of words (and the list doesn't change rapidly), you can have an array or hash coded directly into Javascript.  You could also call out to another web service with jsonp, or have Li create a custom settings property for you and store your words there.

     

    We use a custom settings property in our community to old some community-specific leaderboard data.  We can then access that data from Freemarker or JS.

     

    As for the code, it would depend on the specific UE choices you make.

    • HaikuBT's avatar
      HaikuBT
      Adept

      Big thanks, Kaela! Took me all of 1 minute to create a custom component that does what I needed. I'm soooo excited!