Hello,
I have several subwikis without any local users (only global users can access). The user directory in the main wiki shows all users as expected, but is it possible to change the user directory page of the subwikis to show the global users? At the moment only an empty list is shown.
I tried to make my own user directory page with the following code:
1st option:
{{liveData id="users" properties="last_name,first_name,ibs_abbrev,ibs_comp,ibs_dep" source="liveTable" sourceParameters="className=xwiki:XWiki.XWikiUsers&translationPrefix=xe.userdirectory." limit="100"/}}
2nd option:
{{liveData id="users2" properties="last_name,first_name,ibs_abbrev,ibs_comp,ibs_dep" source="liveTable" sourceParameters="resultPage=xwiki:XWiki.LiveTableResults&className=xwiki:XWiki.XWikiUsers&translationPrefix=xe.userdirectory." limit="100"/}}
but both options show only an empty list. Both options use the correct XWikiUsers class of the main wiki, because only there I have added some custom properties with static lists and they are shown in the table filters.
With the livetable macro I could manage to get the user list, but the translation of the column headers doesn’t work
{{velocity}}
#set($columns = ["last_name", "first_name", "ibs_abbrev", "ibs_comp", "ibs_dep"])
#set($columnsProperties = {
"last_name" : { "type" : "text", "link" : "view"},
"first_name" : { "type" : "text", "link" : "view"},
"ibs_abbrev" : { "type" : "text", "html" : "true"},
"ibs_comp" : { "type" : "text", "html" : "true"},
"ibs_dep" : { "type" : "text", "html" : "true"}
})
#set($options = {
"url" : "$xwiki.getURL('xwiki:XWiki.LiveTableResults', 'get', 'outputSyntax=plain&transprefix=xe.userdirectory.&classname=XWiki.XWikiUsers&collist=last_name,first_name,ibs_abbrev,ibs_comp,ibs_dep')",
"translationPrefix" : "xe.userdirectory.",
"tagCloud" : true,
"rowCount": 100
})
#livetable("userdirectory" $columns $columnsProperties $options)
{{/velocity}}
Any ideas what I can do?
BR Andreas