One more solution still is to hide the regular "Index" from any regular users of the system, replacing the URL in the panel/navbar with a specific and narrow index to one or more spaces, e.g. hardcode the following in place of existing UI access links to "Index" "$xwiki.getURL("Main.SpaceIndex, "view", "space=theworkplace")" Alternately, you can create a single page containing multiple indexes (w/ the 3 lines taken from Main.SpaceIndex): By adding multiple sequences of these three lines in a custom index document for your organization, you can provide easy access to the specific places you want. For each "space" you want an index presented, use the code below to create an index of one space (for multiple, change to doc.space='theworkplace' or doc.space='...' etc) #set ($sql = "where doc.space='theworkplace' order by doc.name asc") #set ($list = $xwiki.searchDocuments($sql)) #includeInContext("XWiki.Results") Niels http://nielsmayer.com PS: i think it would be useful if each space's 'WebHome' was automatically created and had the above three lines already preinstalled, with doc.space set to the current space of the WebHome... On Sat, Jan 31, 2009 at 1:57 AM, Vincent Massol <[email protected]> wrote:
Hi there,
On Jan 30, 2009, at 9:43 PM, bretteua wrote:
Is there any way to hide "admin" type pages from users? What I mean is that when I go to an index or search results, not only does all of the user created pages/content show up, but so does all of the admin pages and pages related to the structure of the XWiki platform. Given that some of my XWiki users are not savvy programming types, I want to avoid them even being able to see these pages. They tend to distract and confuse.
Is there a way to have only end user created content appear in searches, what's new and index pages?
There are several ways:
1) exclude them from the search. We already do that for several pages. For example if you go to http://localhost:8080/xwiki/bin/edit/XWiki/WebSearchCode you'll see this line: #set ($excludedWebs = "doc.space<>'XWiki' and doc.space<>'Admin' and doc.space<>'Panels' and doc.name<>'WebPreferences' and")
2) Mark the pages as hidden. This is a new feature we've added in 1.8M1. We need to mark ourselves those technical pages as hidden in the default XE XAR. Especially since there's no UI to do that right now. Also note that this is a temporary hack while we work on the new model. If you really want to mark a page as hidden you can edit that page in wiki mode, type the following 2 lines, hit preview and then cancel:
$doc.document.setHidden(true) $doc.save()
3) However the best solution is to move your hidden pages to the XWiki space since that space is a technical space that doesn't appear in search results as is show in 1). We normally do that for pages that we consider shouldn't appear in search results. Let us know if we missed some pages that should be hidden.
Thanks -Vincent _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users