Hi! I keep struggling to understand the power of Live Data Macro
In its page under Extensions, Usage heading > Using Velocity, I read:
$services.liveData.render({
'id': "recentPages",
'properties': "doc.title,doc.location,doc.author,doc.date",
'source': "liveTable",
'sourceParameters': "translationPrefix=platform.index."
'filters': "doc.location=help",
'sort': "doc.date:desc",
'limit': "5"
})
I think there are a couple of mistakes: one comma is missing at the end of the line for sourceParemeters
, and limit
expects an integer, not a string:
$services.liveData.render({
'id': "recentPages",
'properties': "doc.title,doc.location,doc.author,doc.date",
'source': "liveTable",
'sourceParameters': "translationPrefix=platform.index.",
'filters': "doc.location=help",
'sort': "doc.date:desc",
'limit': 5
})
Now, if I put that code within XWiki Velocity Macro:
{{velocity}}
$services.liveData.render({
'id': "recentPages",
'properties': "doc.title,doc.location,doc.author,doc.date",
'source': "liveTable",
'sourceParameters': "translationPrefix=platform.index.",
'filters': "doc.location=help",
'sort': "doc.date:desc",
'limit': 5
})
{{/velocity}}
I get some hieroglyph, but not a table.
What I’m missing, please? Should I be able to get the same table as if I use the code in the Usage > In Wiki Syntax
heading?
Thanks!