Forum .LRN Q&A: Re: RFC: Portlet shading

5: Re: RFC: Portlet shading (response to 1)
Posted by Malte Sussdorff on
Andrew, the basic idea is to do as much as possible using the Javascript interface. This is what I meant with "my_portlet_shaded_p" variable which you need, as shaded_p is the name of the variable for each portlet displayed on a page. So, to differentiate in Javascript you have to give each shaded_p TCL variable a unique name.

Then you could use this variable to toggle shading on and off using Javascript. The TCL shaded_p variable comes from the portlet and sets the default value for my_porlet_shaded_p.

This is more a portal system issue than a theme issue, so it is not taken to the theme level.

One issue though: How is the value in my_portlet_shaded_p stored back on the server for the user, so next time he accesses the page he will see the portlet shaded (or not).

The content of the portlet is always transfered from the server to the browser and the browser decides using JS depending on the my_portlet_shaded_p (e.g. forums_shaded_p) parameter whether to display the content or not.