How to Switch mUniversality Mobile View (grid or list)

By default uPortal 4 comes with the mobile view in a icon grid format. Below are instructions on how to set the view to grid or list view.  Note that you must enable the mUniversality Mobile view for this to apply (see How to Turn On the mUniversality Mobile View).

Step 1: Edit stylesheet descriptor

  • Open file for editing uportal-war/src/main/data/default_entities/stylesheet-descriptor/UniversalityMobile.stylesheet-descriptor.xml

    <stylesheet-descriptor xmlns="https://source.jasig.org/schemas/uportal/io/stylesheet-descriptor" xmlns:ns2="https://source.jasig.org/schemas/uportal/io/permission-owner" xmlns:ns3="https://source.jasig.org/schemas/uportal/io/portlet-definition" xmlns:ns4="https://source.jasig.org/schemas/uportal" xmlns:ns5="https://source.jasig.org/schemas/uportal/io/portlet-type" xmlns:ns6="https://source.jasig.org/schemas/uportal/io/user" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.0" xsi:schemaLocation="https://source.jasig.org/schemas/uportal/io/stylesheet-descriptor https://source.jasig.org/schemas/uportal/io/stylesheet-descriptor/stylesheet-descriptor-4.0.xsd">
        <name>UniversalityMobile</name>
        <description>Renders DLMTabsColumns as xhtml for a mobile device</description>
        <uri>classpath:/layout/theme/muniversality/muniversality.xsl</uri>
        <stylesheet-parameter>
            <name>skin</name>
            <default-value>iphone</default-value>
            <scope>PERSISTENT</scope>
            <description>Skin name</description>
        </stylesheet-parameter>
        <stylesheet-parameter>
            <name>view</name>
            <default-value>grid</default-value>
            <scope>PERSISTENT</scope>
            <description>Home screen view type</description>
        </stylesheet-parameter>
        <stylesheet-parameter>
            <name>dashboardForcedWindowState</name>
            <default-value>MINIMIZED</default-value>
            <scope>REQUEST</scope>
            <description>Overloading the use of the stylesheet parameters to denote the forced window state when rendering the dashboard view</description>
        </stylesheet-parameter>
    </stylesheet-descriptor>
    
    

 

  • Locate the "view" stylesheet parameter and modify the "default-value" to either grid or list

    <stylesheet-parameter>
            <name>view</name>
            <default-value>grid</default-value>
            <scope>PERSISTENT</scope>
            <description>Home screen view type</description>
    </stylesheet-parameter>

Step 2: Import the file changes

Run the data-import command to import the changes

ant data-import -Dfile=uportal-war/src/main/data/default_entities/stylesheet-descriptor/UniversalityMobile.stylesheet-descriptor.xml

Step 3: Rebuild/Redeploy uPortal

ant clean deploy-war

Step 4: Restart Tomcat

Restart your tomcat server to activate changes.

 

Having problems with these instructions?

Please send us feedback at uportal-user@lists.ja-sig.org