You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Aurelien Pernoud <ap...@sopragroup.com> on 2003/07/15 17:40:24 UTC

RE: Background Image

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: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org