01 Creating a new Theme

The default uPortal theme is named universality and located in uportal-war/src/main/resources/layout/theme. If you would like to create a new theme the recommended method is to create a copy of universality and then modify it to meet your needs. An entry also needs to be added to the database to enable your new theme.

Steps to add a new Theme

  1. Create a new theme directory under uportal-war/src/main/resources/layout/theme and ensure there is a .sdf file describing your theme.
    • The recommended approach here is to simply copy the universality theme and then modify it to fit your needs.
  2. Add the Theme to the uPortal database.
    • This can be done via a .theme entity file. An example is the entity file for the universality theme: uportal-impl/src/main/resources/properties/db/entities/theme/DLM_XHTML-1.theme
    • If you are starting with an empty database you simply need to edit the .layout and .fragment-layout files so that the <theme name=""> entry in the <profile> section matches the name in your .theme file.
    • If you have existing users you will need to run SQL to update their profiles to point to the ID of the theme you imported via the .theme file.

To import the .theme file do the database run:

ant crn-import -Ddir=/full/path/to -Dpattern=fileName

Skins for new theme

If you want the new theme to have its own skins, you should also copy uportal-war/src/main/webapp/media/skins/universality to a new directory and edit the hard coded reference to the theme's skin list.
In uportal-impl/src/main/java/org/jasig/portal/channels/DLMUserPreferences/TabColumnPrefsState.java
change
protected static String SKIN_LIST_FILE = "media/skins/universality/skinList.xml";
to point to skinlist.xml in your new theme's skin directory.
Contributed on uportal-user by Bob Finch