Set a Default Skin

Each theme (desktop, mobile, etc.) has a defined default skin.  This selected skin will be shown to all users who have not overridden the default by actively selecting an alternate skin.

To update the default skin for the main uPortal theme, edit the file uportal-war/src/main/data/required_entities/stylesheet-descriptor/DLMXHTML.stylesheet-descriptor.xml and re-import the theme to the uPortal database. You may use the import-export portlet or run an import from the command line:

ant data-import -Dfile=uportal-war/src/main/data/required_entities/stylesheet-descriptor/DLMXHTML.stylesheet-descriptor.xml

Setting the Default Skin for Existing Users

Only users that have chosen a skin other that the default will not see the new default skin. TODO: determine how to force a change of skin on to users that have already customized.

Dynamically Select a Default Skin

As of uPortal 4.0.4, the portal can dynamically select a default skin based on user groups or attributes.  This feature may be used to provide different default skins to separate user groups, campuses, etc.

Since: uPortal 4.0.4

Dynamically Select Default Skin using User Attributes

Selecting a default skin for a user based on a user attribute can be done by following these steps:

Step 1: Uncomment the UserAttributeSkinMappingTransformerConfigurationSource bean

Edit uportal-war/src/main/resources/properties/contexts/renderingPipelineContext.xml and uncomment the block that looks like:

<!-- Uncomment and configure to map a user attribute value to various skin names -->
<bean class="org.jasig.portal.rendering.xslt.UserAttributeSkinMappingTransformerConfigurationSource">
    <property name="skinAttributeName" value="serverName" />
    <property name="attributeToSkinMap">
        <map>
            <entry key=".*\.example\.com" value="example.com" />
        </map>
    </property>
</bean>

Step 2: Specify the User Attribute Name

Modify <property name="skinAttributeName" value="serverName" /> changing the value to the user attribute name to base the skin choice on.

Step 3: Map Attribute Value Patterns to Skin Names

Add one <entry key=".*\.example\.com" value="example.com" /> in the attributeToSkinMap for each mapped skin. The key is a regular expression pattern, the value is the name of the skin to set if the pattern matches.

Dynamically Select Default Skin using Groups

Selecting a default skin for a user based on group memebership can be done by following these steps:

Step 1: Uncomment the UserGroupSkinMappingTransformerConfigurationSource bean

Edit uportal-war/src/main/resources/properties/contexts/renderingPipelineContext.xml and uncomment the block that looks like:

<!-- Uncomment and configure to map user group membership to various skin names -->
<bean class="org.jasig.portal.rendering.xslt.UserGroupSkinMappingTransformerConfigurationSource">
    <property name="groupToSkinMap">
        <map>
            <entry key="pags.studends" value="students" />
            <entry key="pags.staff" value="staff" />
            <entry key="pags.faculty" value="staff" />
        </map>
    </property>
</bean>

Step 2: Map Group Keys to Skin Names

Add one <entry key="pags.faculty" value="staff" /> in the groupToSkinMap for each mapped skin. The key is a uPortal group key, qualified with the group store name, the value is the name of the skin to set if the user is a deep member of the specified group.

 

Â