On 11/10/2010 02:32 PM, [Ricardo Rodriguez] eBioTIC. wrote: > Hi! > > Following these lines in the panelheader macro un macros.vm... > > #macro(panelheader $title) > #set($cookieName = "${context.user}_${panel}") > #set($expanded = $xwiki.getUserPreferenceFromCookie($cookieName)) > #if(!$expanded) > #set($expanded = 'expanded') > #end > > I understand that the default value, expanded, for XWiki panels is set > there. This code says: > > 1. Set the name of the cookie that fixes the expanded/collapsed state > for a given user and panel. > 2. If this cookie exists and it has this preference set, it takes the > value from it. > 3. If fails to get the value from the cookie, set the value as 'expanded' > > Thus, all panels are shown expanded by default and, to the best of my > understanding, setting: > > #set($expanded = 'collapsed') > > Must show all the panels closed. > > I'm not able to get this working. Please, where am I wrong?
It should work (just tried it locally), but changing macros.vm requires that you restart the server, since the macros are loaded at startup and cached. -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users