How to change Theme based upon logged in user for a portlet. - Websphere

This is a discussion on How to change Theme based upon logged in user for a portlet. - Websphere ; Hi, I know how to create theme, and deploy to portal, and then apply this theme for the portlet, but my requirement is something like this. _*Scenario:*_ *if userA logs in the portal, he should see ThemeA, SkinA for XYZPortlet* ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: How to change Theme based upon logged in user for a portlet.

  1. How to change Theme based upon logged in user for a portlet.

    Hi,
    I know how to create theme, and deploy to portal, and then apply this theme for the portlet, but my requirement is something like this.

    _*Scenario:*_
    *if userA logs in the portal, he should see ThemeA, SkinA for XYZPortlet*
    *if userB logs in the portal, he should see ThemeB, SkinB for XYZPortlet(portlet remains same, just user and theme changes.*

    basically, how im trying to approach this is:
    1) I get the logged in users role from LDAP, based upon the users role, im thinking of changing the theme.
    My question is where should i make this if(roleA){use themeA} if(roleB){use themeB}.
    Should this be in JSP, or portlet.java, or somewhere in themes folder in portal.

    Im using websphere portal 6.1

    helps is appreciated.

    thank you.

  2. Re: How to change Theme based upon logged in user for a portlet.

    Well the best way is to customize your theme, as the portlet should be independent of anything going on in the theme. Now that being said you cannot really change the skin and theme on the fly you would just need to change what you d1splayed.

    Jim



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  3. Re: How to change Theme based upon logged in user for a portlet.

    Probably not the best solution, but you could use JavaScript to change the divs where that portlet resides to a different id after the page has loaded.

    You would have to figure out what css IDs are produced by looking at the HTML produced by the portal and have your JavaScript update them accordingly.

    But again, not an elegant solution.

  4. Re: How to change Theme based upon logged in user for a portlet.

    Jim,

    can you please explain a little bit on your last stmt "change what you displayed".

    Is it possible that, in my control.jsp or some jsp in the theme, I capture the logged in user's role.(For this can i get the portal's current logged in user in the theme?)
    Based upon that i flip my images, icons, CSS etc... using the if(role) stmts.

    What do you say?

    Thank you.

  5. Re: How to change Theme based upon logged in user for a portlet.

    What are the differences between themeA and ThemeB & SkinA and SkinB. Is it just style changes?

    Thanks,
    Jishnu

  6. Re: How to change Theme based upon logged in user for a portlet.

    Yes, they are just Style changes and some images changes.

    Basically, the theme on a page should be able to change based upon logged in user is the requirement. portlets remain same. If we are able to change the skins on the portlet too based on logged in user then it is great. But i guess it cannot be done. If possible then please let me know.

    Thank you,

  7. Re: How to change Theme based upon logged in user for a portlet.

    If they are just style and image changes you can achieve it by using different color palettes.
    Instead of having multiple themes with different image/style change you can have multiple color palettes.
    You can put the logic in the theme to load the color palette based on the user who has logged in.

    Thanks,
    Jishnu

+ Reply to Thread