Hello,
im trying to make an Velocity script that uses Live Table or if possible Live Data, that lists all sub pages and also list their tags in a column if they have tags. If they don’t have tags they still should be listed. So far I am successful to create the Live Table that list all child pages with the columns that I need but I am failing to to figure out, how to read / display the tags of the pages.
What I tried so far is:
#set($collist = ['doc.title', 'tagsProperty.tags'])
#set($colprops = {
'doc.title' : { 'type' : 'text' , 'size' : 30, 'link' : 'view', 'displayName' : 'Software' },
'tagsProperty.tags' : { 'type' : 'text', 'displayName' : 'Tags' }
})
#set($options = {
"tagCloud" : true,
"selectedColumn" : "doc.title",
"rowCount" : 25,
"extraParams" : "&tagsProperty=XWiki.TagClass",
"extraParams" : "&location=Softwareliste"
})
#livetable('software' $collist $colprops $options)
The tagCloud is activated just for now to help me, I don’t want to use that later on.
In the column “Tags” every entry (even for pages that have at least one tag) shows “emptyvalue”. So im guessing im not correctly reading out the XWiki.TagClass.tags property of the pages.
As I understood it, "extraParams" : "&tagsProperty=XWiki.TagClass",
defines a custom propertyName in my case “tagsProperty” so that it can be used in Live Table. “tagsProperty.tags” should (as I understood it) read out the “tags” property of the pages that have an Object from Type XWiki.TagClass.
As Live Tables are to be replaced by Live Data, I tried that too, but failed to even simply list all child pages of the current space. That feature seems impressively powerful, but man this thing is huge.