I just found that your #foreach loop isn't running at all. Placed some text inside. On Tue, Mar 10, 2009 at 1:36 PM, Sebastian Kannengiesser <sebastian.kannengiesser@gmail.com> wrote:
Hi Sergiu,
thanx for your reply. Your velocity code does not have any effect, at least, I didn't get the desired result :( With layout I mean the Panels. My globakl setting is to have a panel area only on the left side, whereas some spaces have two panel areas and a different selection of panels on them. Now, I'd like all spaces to have the exact panels I chose in the global layout administration and those to be placed only on the left hand side, also as set globally.
Btw, to run your code I just created a page in Main space and entered the code. That should do it, right?
I'd be grateful for any further suggestions.
Thanx, Sebastian
On Tue, Mar 10, 2009 at 1:02 PM, Sergiu Dumitriu <sergiu@xwiki.com> wrote:
Sebastian Kannengiesser wrote:
Hi guys,
I once configured different layouts for my different spaces. Now I decided, that all spaces should look in a common way. Actually, changing the Global layout in the administration does not overwrite the space-specific layouts. How can I remove those specific layout configurations, so every space takes the global configuration?
What do you understand by layout? The panels located on the left/right side?
Try this:
#foreach($spacePref in $xwiki.searchDocuments(", BaseObject prefs, StringProperty panels where doc.name = 'WebPreferences' and prefs.name = doc.fullName and prefs.className = 'XWiki.XWikiPreferences' and panels.id.id = prefs.id and (panels.id.name = 'leftPanels' or panels.id.name = 'rightPanels') and panels.value <> ''")) #set($spacePrefsDoc = $xwiki.getDocument($spacePrefs)) #set($spacePrefsObj = $spacePrefsDoc.getObject('XWiki.XWikiPreferences')) $spacePrefsObj.set('leftPanels', '') $spacePrefsObj.set('rightPanels', '') $spacePrefsDoc.save() #end
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users