Hi, The colortheme per space can be used to set department specific content The only customization we did was the following (we are running 3.5.1, but I think t works from most of the 3.x)
On the SKIN we attached a copy of colorThemeInit.vm We put a small piece of code inside; #if ($!{context.language} == 'nl') #set ($themeDocFullName = 'ColorThemes.BlogNLTheme') #end The #if could of course be as complex as you would like and look for department instead of context.language Note that we delayed the colortheme setting to allow visitors (or admin's) to set their own colortheme by request.colortheme #if (!$themeObj) ## First, try to take the theme from the request URL #set ($themeDocFullName = "$!{request.colorTheme}") ## Second, try to take the theme from the preferences (user, space, wiki) #if ($themeDocFullName == '') #if ($!{context.language} == 'nl') #set ($themeDocFullName = 'ColorThemes.BlogNLTheme') #end #end #if ($themeDocFullName == '') #set ($themeDocFullName = "$!xwiki.getUserPreference('colorTheme')") #end ## Last, just use the default theme #if ($themeDocFullName == '') #set ($themeDocFullName = 'ColorThemes.DefaultColorTheme') #end #set ($themeDoc = $xwiki.getDocument($themeDocFullName)) #set ($themeObj = $themeDoc.getObject('ColorThemes.ColorThemeClass', true)) #end #if ("$!themeObj" != '') #foreach ($prop in $themeObj.properties) ## Simple validation of the color values. #if (!$prop.name.endsWith('Color') || $prop.value.matches('transparent|#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}')) #set ($discard = $theme.put($prop.name, $prop.value)) #end #if ($prop.name.endsWith('Image')) #if ("$!prop.value" != '') #set ($discard = $theme.put($prop.name, "url(${themeDoc.getAttachmentURL($prop.value)})")) #else #set ($discard = $theme.put($prop.name, '')) #end #end #end #end Op 25 jun. 2012, om 15:27 heeft Hamster het volgende geschreven: > Moritz, > > I can't find any velocity code to change the colortheme on that page... > > ....can you provide an example? > > -- > View this message in context: > http://xwiki.475771.n2.nabble.com/change-colortheme-tp4509734p7579870.html > Sent from the XWiki- Users mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users