Skip to Content
0

How to change portal theme by code

Dec 05, 2016 at 07:43 AM

147

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

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

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

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Kamal.

I'm building a custom accessibility menu in which user should be able to change theme on the fly (one portal desktop is assigned with different themes is assigned to one user).

I've ended up using a different approach:

I decompiled the personalization portal application and took relevant code from it.

The problem (as always) is to find relevant jars for the (private API) classes...

Regards,

Omri

0

Could you share your code please?

0
Former Member
Julio Alberto Martinez Real

Hi Julio Alberto Martinez Real,

I can't upload the files to new SCN (although I changed the file extensions...)

How can I send you the files?

Regards,
Omri

0
0
Former Member
Julio Alberto Martinez Real

I sent it

0