Akihiko wrote:

> Paul, 
> 
> Basically all I am looking for is to apply any visual changes to the entire
> screen.  When the root portletSet is skinned, all of its children portlets and
> sets inherit that skin.  What I am looking for is a way to extend that change
> outside of the portlet container.  For example if the user chooses a skin with
> green text color, I would like the text in the three navigations (top, left,
> and bottom) to update to green as well.
> 
> After looking through the documentation it looks like there might be a way to
> retrieve the skin, and at first glance it seems to work...
> 
> #set( $profile = $data.getProfile())
> #set( $doc = $profile.getDocument())
> #set( $portlets = $doc.getPortlets(0)) ## perhaps by name?
> #set( $skin = $portlets.getSkin())
> #set( $skinName = $skin.getName())
> 
> Confusing, but it seems to work.  Do you see any potential problems with this?
> 

Yes, this will work reliably as long as the Profile is loaded in the session
validation step (which is true in Jetspeed).

You can actually do somewhat better than this, you can either do:

- #set ( $skin = $data.Profile.RootSet.PortletConfig.PortletSkin )
   or
   #set ( $skin = $data.Profile.Portlets.Skin )

- write a SkinTool that does exactly this but hides it from the remplate designer,
   register it in TR.p with a request scope and use it in any screen/navigation/...
   much like the default Turbine ui tool.
   This would be a much cleaner design.

   Of course, contribute back the code :)

--
Raphael Luta - [EMAIL PROTECTED]
Vivendi Universal Networks - Paris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to