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.
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.
Ok with Live Data I am able to create a Table that show the tags, BUT it now only list pages that have tags at all. Pages that don’t have tags are not shown.
However I wan’t to display all pages, even those that does not have tags.
Can you help me to achive that?
Also I want to filter to only show pages in that location, but I don’t want to include the collumn “doc.location”. If I remove “doc.location” from properties, then the filter wont apply. How do I hide the location column completely but still filter by it?
I know, when using Live Data users can unselect to see that doc.location property “accessible from the hamburger menu” but I don’t want it to be visible for users in the first place.
I think it is currently not possible. sourceParameters="className=XWiki.TagClass&translationPrefix=platform.index."} retrieves all documents, and only those documents holding at least one instance of class XWiki.TagClass. If a document has no XWiki.TagClass instance, it won’t appear. Workaround: add an XWiki.TagClass object with an empty tags property.
Looking for a better answer from developers and more experienced users! HTH!
It is working for me here. In this case, documents not holding a XWiki.TagClass class instance will show Tags as emptyvalue. I don’t know why yet! Also, the parent page, Software.WebHome will appear in the list.
Thank you, I had tried that initially but failed due to inline warning of the LiveData Macro and thought it was not usable like that. But now I fixed my mistake.