Ricardo Rodríguez wrote:
> 
> Please, Lockie, how to you get a collapsed panel at page loading time 
> being later on controlled by a cookie? I mean, panel A appears collapsed 
> when you access the site for the first time. From this moment onwards, a 
> cookie will remember the preferences of each visitor.
> 
Hi Ricardo

Unfortunately I haven't solved this issue. I was previously using a
javascript extension to default the panels as collapsed but that was also
effecting page load times since the script was loaded on each page.

document.observe('xwiki:dom:loaded', function() {
   $$('.panel').each(function(item) {
     item.removeClassName('expanded');
     item.addClassName('collapsed');
   });
}); 

But that does the exact same thing as this only without the need to have an
extension load each time:

 #if(!$expanded)
     #set($expanded = 'collapsed')
 #end 

These two ways have the panels collapsed regardless of whether the user has
been there or not. So I'm stuck in the same situation as you. :( What would
be perfect in my case is if you could somehow link a space to a panel so
that the panel whose space you are looking at remains open displaying all
its pages, while the other spaces remain closed.

-----
----
Lockie
--
View this message in context: 
http://xwiki.475771.n2.nabble.com/struggling-to-understand-panels-expanding-initial-state-tp6095465p6217462.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

Reply via email to