Forum Discussion
keshavkelkar
Ace
PerBonomi Can you please tell me the REST call to or alternative way to get ${env.context.message.id} ?
I am getting freemarker error when I try to access ${env.context.message.id}, so I need some alternative way such as REST call or any other so that I could get the same value as I am getting by ${env.context.message.id} .
jferrandis
8 years agoExpert
depndening of what you really whant to do in your component, you can use such kind of snippet :
<#assign messagesQuery = rest("2.0","/search?q=" + "SELECT * FROM messages WHERE foo='bar' ORDER BY post_time DESC LIMIT 5"?url) /> <#if messagesQuery.data.size gt 0> <#list messagesQuery.data.items as message> <#-- do some stuff --> ${message.foo} will print 'foo' </#list> </#if>
See the message Table structure for more precision about query filters and sort options
If you want more help you should explain precisely what you want to :
- what is your component for?
- where you want to use it? (which page).
Related Content
- 2 years ago
- 11 years ago
- 2 years ago
- 4 years ago
- 5 months ago