[xwiki-users] Show hidden spaces
Hi All, first of all. A happy new year to everybody. I hide some spaces with the extension http://extensions.xwiki.org/xwiki/bin/view/Extension/Hide+a+space because my user should not see my macro-space or some other admin-stuff. But i want to display for myself a simple page where i can list all hidden spaces and documents. The displaying of documents is easy with http://extensions.xwiki.org/xwiki/bin/view/Extension/Display+hidden+pages+fr.... But how can i find the hidden spaces? $xwiki.spaces only gives me the not-hidden ones. Regards, Matthias -- View this message in context: http://xwiki.475771.n2.nabble.com/Show-hidden-spaces-tp7593554.html Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Matthias, Happy New Year too. Not sure if this is relevant for your problem but in your user preferences, there is an option about "Display Hidden Documents". Did you try to activate it? But maybe this solution does not completely fit with your need. Hope this helps. On Sun, Jan 04, 2015 at 05:36:40AM -0700, Matthias Wegner wrote:
Hi All,
first of all. A happy new year to everybody.
I hide some spaces with the extension http://extensions.xwiki.org/xwiki/bin/view/Extension/Hide+a+space because my user should not see my macro-space or some other admin-stuff. But i want to display for myself a simple page where i can list all hidden spaces and documents. The displaying of documents is easy with http://extensions.xwiki.org/xwiki/bin/view/Extension/Display+hidden+pages+fr....
But how can i find the hidden spaces? $xwiki.spaces only gives me the not-hidden ones.
Regards, Matthias
-- View this message in context: http://xwiki.475771.n2.nabble.com/Show-hidden-spaces-tp7593554.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org
Hi Matthias, Try this quick query/script to show you all spaces in which all documents are hidden (i.e. do not contain visible documents): {{velocity}} #set ($spaces = $services.query.hql("SELECT DISTINCT doc.space FROM XWikiDocument doc WHERE NOT EXISTS (SELECT doc2.fullName FROM XWikiDocument doc2 WHERE doc2.space = doc.space AND doc2.hidden <> 1)").execute()) Hidden spaces: #foreach ($space in $spaces) * $space #end {{/velocity}} Thanks, Eduard On Mon, Jan 5, 2015 at 11:58 AM, Jean SIMARD <[email protected]> wrote:
Hi Matthias,
Happy New Year too.
Not sure if this is relevant for your problem but in your user preferences, there is an option about "Display Hidden Documents". Did you try to activate it?
But maybe this solution does not completely fit with your need.
Hope this helps. On Sun, Jan 04, 2015 at 05:36:40AM -0700, Matthias Wegner wrote:
Hi All,
first of all. A happy new year to everybody.
I hide some spaces with the extension http://extensions.xwiki.org/xwiki/bin/view/Extension/Hide+a+space because my user should not see my macro-space or some other admin-stuff. But i want to display for myself a simple page where i can list all hidden spaces and documents. The displaying of documents is easy with
http://extensions.xwiki.org/xwiki/bin/view/Extension/Display+hidden+pages+fr... .
But how can i find the hidden spaces? $xwiki.spaces only gives me the not-hidden ones.
Regards, Matthias
-- View this message in context:
http://xwiki.475771.n2.nabble.com/Show-hidden-spaces-tp7593554.html
Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hello, (First let me start off by wishing everyone a very Happy New Year.) You can use somethink like this to find hidden space (even if the user don't display hidden doc) #set ($items = $xwiki.search("select doc.space from XWikiDocument as doc where doc.name='WebHome' and doc.hidden = '1'")) #foreach ($item in $items) * $item #end (to avoid multi language problem who's generate some dupplicate entries perhaps you can add doc.defaultLanguage='en' parameter in the query?) Pascal B De : Matthias Wegner <[email protected]> À : [email protected] Envoyé le : Dimanche 4 janvier 2015 13h36 Objet : [xwiki-users] Show hidden spaces Hi All, first of all. A happy new year to everybody. I hide some spaces with the extension http://extensions.xwiki.org/xwiki/bin/view/Extension/Hide+a+space because my user should not see my macro-space or some other admin-stuff. But i want to display for myself a simple page where i can list all hidden spaces and documents. The displaying of documents is easy with http://extensions.xwiki.org/xwiki/bin/view/Extension/Display+hidden+pages+fr.... But how can i find the hidden spaces? $xwiki.spaces only gives me the not-hidden ones. Regards, Matthias -- View this message in context: http://xwiki.475771.n2.nabble.com/Show-hidden-spaces-tp7593554.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hello and a happy new year you too, Pascal :) Your solution only displays spaces *that contain at least one hidden document*. However, the question was (as I`ve read it), how to display hidden spaces (i.e. spaces that contain *only hidden documents*), thus the inner select clause from my previous reply. Thanks, Eduard On Tue, Jan 6, 2015 at 4:41 PM, Pascal BASTIEN <[email protected]> wrote:
Hello, (First let me start off by wishing everyone a very Happy New Year.) You can use somethink like this to find hidden space (even if the user don't display hidden doc)
#set ($items = $xwiki.search("select doc.space from XWikiDocument as doc where doc.name='WebHome' and doc.hidden = '1'")) #foreach ($item in $items) * $item #end
(to avoid multi language problem who's generate some dupplicate entries perhaps you can add doc.defaultLanguage='en' parameter in the query?)
Pascal B De : Matthias Wegner <[email protected]> À : [email protected] Envoyé le : Dimanche 4 janvier 2015 13h36 Objet : [xwiki-users] Show hidden spaces
Hi All,
first of all. A happy new year to everybody.
I hide some spaces with the extension http://extensions.xwiki.org/xwiki/bin/view/Extension/Hide+a+space because my user should not see my macro-space or some other admin-stuff. But i want to display for myself a simple page where i can list all hidden spaces and documents. The displaying of documents is easy with
http://extensions.xwiki.org/xwiki/bin/view/Extension/Display+hidden+pages+fr... .
But how can i find the hidden spaces? $xwiki.spaces only gives me the not-hidden ones.
Regards, Matthias
-- View this message in context: http://xwiki.475771.n2.nabble.com/Show-hidden-spaces-tp7593554.html Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (4)
-
Eduard Moraru -
Jean SIMARD -
Matthias Wegner -
Pascal BASTIEN