Hi Raphael,

I know this mail is a long time ago (about 2 months) but I just had the time
to test it :)

In fact your method perfectly works (I removed the pageName parameter as it
was unused in the method ?), but it returns the top skin only (the one you
access by the top right cuctomize button icon), not the skin from current
selected Pane for example.
So I can't apply a different background changing on pane change.

If you have any idea... or someone else who is aware of the skin algorithm.

Thx,
Aurelien

Luta, Raphael (VUN) a �crit :

> To be able to access the page skin from the Turbine layout
> template you'll need to add the JetspeedTool class to return this
> skin object (or subclass it and replace the tool definition in TR.p).
>
> this new method would look something like (without Exception handling
> to simplify
> code):
>
> public PortletSkin getPageSkin(String pageName)
> {
>   Profile profile = rundata.getProfile();
>   PortletSkin skinObject = null;
>
>   if (profile == null)
>   {
>     profile = Profiler.getProfile(rundata);
>     rundata.setProfile(profile);
>   }
>
>   PSMLDocument doc = profile.getDocument();
>   if (doc != null)
>   {
>     Skin pageSkin = doc.getPortlets().getSkin();
>
>     if (pageSkin == null)
>     {
>       skinObject = PortalToolkit.getSkin("");
>     }
>     else
>     {
>       skinObject = PortalToolkit.getSkin(pageSkin);     }
>   }
>
>   return skinObject;
> }
>
> With this simple method, you can then put in your layout something
> like :
>
> #set $skin =
> $jetspeed.getPageSkin($request.getParameter("page","default"))
> <body class="$skin.MyCurrentSkinClass">
>


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

Reply via email to