Forum Discussion

bhupen's avatar
bhupen
Advisor
10 years ago

how to get post_time?

Hi guyz, I have got post title and author login but Iam not able to get the post time. Can any body help me in this: following is the api i used: http://community.lithium.com/restapi/vc/search/mes...
  • OlivierS's avatar
    OlivierS
    10 years ago

    bhupen 

     

    You're developing lots of widgets !

    Try this one, worked for me:

     

    <div class="recent_digital_platform">
    <h3>Trending Topics</h3>
    <#setting locale="en_US">
    <#assign messages = rest("2.0","/search?q=" + "SELECT * FROM messages WHERE replies.count(*)>0 AND depth=0 order by replies.count(*) desc LIMIT 3"?url) />
    <#if messages.data.items??>
      <#list messages.data.items as recent >
        <#if recent?has_content>
          <a href="${recent.view_href}">${recent.subject}</a>
          <span>${recent.author.login}</span>
          <span>${recent.post_time?datetime}</span>
          <br/>
        <#else>
          No post Trending Topics found.
        </#if>
      </#list>
    </#if>
    </div>

     

    2015-02-06_0923.png