Skip to Content

How to change portal theme by code

Hello Experts,

I'm using EP 7.31 SP7 and I need to write my own personalization menu.
One of the options should be changing portal theme.

How can I change portal theme for user by code?

Regards,
Omri

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 06, 2016 at 12:51 PM

    Hi Omri,

    You can achieve this requirement in the following way:

    1) Create a portal desktop and add framework page and required theme to it.

    2) Repeat the above step for other themes as well. (for n number of themes there must be n number of portal desktops).

    3) Create an empty portal role(s)(with invisible property) specific to a single portal desktop.

    4) Under Master Rule Collection, add these portal roles and their specific portal desktops.

    5) Now, create a portal application or web dynpro java application.

    Java application should be able to read the user or group.

    On the basis of user/group add the required role(with has required portal desktop) to user/group

    Save and commit these UME Changes.

    6) Add the above portal application iview to framework page which should be before the masthead( i., it must the first loading iview under framework page).

    7) Now, once the user logged into the portal, a corresponding role get's assigned by the java code which in turn calls the master rule collection there by it fetches required portal desktop which has required theme.

    8) This works well and we've tested in our portals.

    Regards,

    Kamal

    Add comment
    10|10000 characters needed characters exceeded