Creating Personalization Options

In my previous post, I described how we can edit existing Personalization Options to allow for User Preference-Based Homepage Types. I am going to expand on this same topic and demonstrate how to create a custom Personalization Option that will allow end users to select a Portal Branding Theme on their My Preferences page. The end goal here is to allow end users to select their Homepage type (Classic or Fluid) as well as allow them to select their Theme so that they can have the most optimal user experience.

Define Personalization Option

Navigate to Main Menu > PeopleTools > Personalization > Personalization Options. Open the CSTM Option Category Level. Add a new row to the grid and populate the fields under the Definition tab as follows:

User Option: PSM_THEME
Description: Portal Branding Theme
Option Category Group: Custom Personalizations
Option Category: Genral Options
User Option Type: System

Option Definition

Then populate the fields under the Format tab as follows:

Record (Table) Name: PTBR_THEME
Field Name: DESCR

Option Format

Provision User Personalization Security

Navigate to Main Menu > PeopleTools > Security > Permissions & Roles > Permission Lists. Open a Permission List of your choosing and select the Personalizations tab. Add a new row to the Personalizartion Options grid and populate the fields as follows:

Option Category Level: Custom
Option Category Group: Custom Personalizations

Permission List

Click the Edit Options link to be taken to the Personalization Permissions page. Check the Allow User Option checkbox for the row with the PSM_THEME User Option.

Personalization Permissions

Results

Now when a privileged user goes to the My Preferences page, they will have the ability to select a Portal Branding Theme from the list of configured Themes.

My Preferences


The configuration done in this post will allow for developers to make use of the GetUserOption function for the newly defined PSM_THEME User Option. The PeopleCode would look like:

Local String &sDescr = GetUserOption("CSTM", "PSM_THEME");

And the function will return the description of the Portal Branding Theme that the user has selected.

In my next post, I will demonstrate how we can leverage the GetUserOption function in a custom User Attribute so that we can conditionally apply the user’s selected Portal Branding Theme at runtime.